Skip to content

Remove trailing space in Swig item template to enhance syntax highlighting #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

alademann
Copy link
Contributor

The space between the name of a @function / @mixin and the opening parentheses causes Prism to choke / not recognize and highlight everything correctly.

Before:

@mixin name () { ... }
@function name () { ... }

This caused Prism to not highlight everything correctly like so:

<code class=" language-scss" data-language="scss">
  <span class="token keyword">@mixin</span> text-highlighted ()<span class="token selector"> </span><span class="token punctuation">{</span> ... <span class="token punctuation">}</span>
</code>

After:

@mixin name() { ... }
@function name() { ... }

Which results in correctly formatted markup via prism:

<code class=" language-scss" data-language="scss">
  <span class="token keyword">@mixin</span> <span class="token function">text-highlighted</span>()<span class="token selector"> </span><span class="token punctuation">{</span> ... <span class="token punctuation">}</span>
</code>

+ The space between the name of a @function / @mixin and the opening parentheses causes Prism to choke / not recognize and highlight everything correctly.
KittyGiraudel added a commit that referenced this pull request Jul 12, 2014
Remove trailing space in Swig item template to enhance syntax highlighting
@KittyGiraudel KittyGiraudel merged commit faa4a43 into SassDoc:master Jul 12, 2014
@KittyGiraudel
Copy link
Member

Agreed. Thanks Aaron. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants