sassdoc icon indicating copy to clipboard operation
sassdoc copied to clipboard

Add ability to have code preview for Sass syntax

Open CREEATION opened this issue 9 years ago • 13 comments

Hello there,

as I'm using the Sass syntax, not SCSS, it would be really cool to also output Sass instead of SCSS in the docs. It doesn't make much sense to have Sass syntax source code and an SCSS documentation. :P

Thomas

CREEATION avatar Feb 26 '15 16:02 CREEATION

Hi,

the Parser is expecting the SCSS syntax to be able to correctly delimit code blocks. So at the moment this is not possible. Related #236

pascalduez avatar Feb 26 '15 16:02 pascalduez

Hey,

The fact is SassDoc doesn't directly supports Sass syntax; internally it is converting Sass to SCSS using sass-convert and SassDoc works from the converted SCSS code.

We're aware of this issue, and I agree it's a kinda surprising behavior that's only due on how SassDoc works internally with Sass files, but we consider it's kinda an edge case and it's not in our short term plans.

However we aborded this subject at some point and while the related issue is closed, we would still happily accept a PR with a sass-comment-parser support.

valeriangalliat avatar Feb 26 '15 16:02 valeriangalliat

Fucked idea of the month: a sassdoc-extras filter that convert the code blocks back to Sass with sass-convert :trollface:

pascalduez avatar Feb 26 '15 16:02 pascalduez

Fucked idea of the month: a sassdoc-extras filter that convert the code blocks back to Sass with sass-convert :trollface:

Haha this is the best Quick & Dirty™ fix for this issue I can imagine. :smile:

valeriangalliat avatar Feb 26 '15 16:02 valeriangalliat

Not a priority. We'll tackle this for 2.3 or later.

KittyGiraudel avatar Feb 27 '15 13:02 KittyGiraudel

The Quick & Dirty™ fix is not going to happen. That would mean opening a child-process for each code snippet, definitely a no go. If sass-comment-parser would be the preferred solution.

pascalduez avatar Feb 27 '15 14:02 pascalduez

I'm still not willing to spend time on this. Do you guys (@SassDoc/owners) think it is necessary?

KittyGiraudel avatar Apr 05 '15 10:04 KittyGiraudel

I have no idea of a clean solution right now, apart from writing a sass-comment-parser. If we see a large amount of +1s on this issue, I'm okay to spend some time on this, but otherwise I think it's not necessary.

valeriangalliat avatar Apr 05 '15 17:04 valeriangalliat

I have no idea of a clean solution right now, apart from writing a sass-comment-parser. If we see a large amount of +1s on this issue, I'm okay to spend some time on this, but otherwise I think it's not necessary.

++

pascalduez avatar Apr 05 '15 21:04 pascalduez

+1 this issue. Somewhat relatedly, I'm running into an issue where sass-convert cannot successfully run:

» [ERROR] Error: spawn bundle exec sass-convert ENOENT
    at exports._errnoException (util.js:742:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1038:32)
    at child_process.js:1129:20
    at process._tickCallback (node.js:372:11)

misscs avatar May 01 '15 18:05 misscs

Hi @misscs, this is not related to the Sass syntax in code preview issue. It's an issue with sass-convert Node.js bindings, so I moved it here.

valeriangalliat avatar May 01 '15 18:05 valeriangalliat

Ah, thanks!

On Fri, May 1, 2015, at 14:06, Valérian Galliat wrote:

Hi @misscs[1], this is not related to the Sass syntax in code preview issue. It's an issue with sass-convert Node.js bindings, so I moved it here[2].

— Reply to this email directly or view it on GitHub[3].

Links:

  1. https://github.com/misscs
  2. https://github.com/SassDoc/sass-convert/issues/10
  3. https://github.com/SassDoc/sassdoc/issues/376#issuecomment-98190094

misscs avatar May 01 '15 18:05 misscs

This has been open for 2 years, and I don’t think there is much more of a solution than last time we discussed it. Shall we close this @SassDoc/owners?

KittyGiraudel avatar Feb 18 '17 12:02 KittyGiraudel