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

Merged
merged 1 commit into from Jul 12, 2014

Conversation

Projects
None yet
2 participants
@alademann
Contributor

alademann commented Jul 12, 2014

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>
Remove trailing space to enhance Prism syntax highlighting
+ The space between the name of a @function / @mixin and the opening parentheses causes Prism to choke / not recognize and highlight everything correctly.

HugoGiraudel added a commit that referenced this pull request Jul 12, 2014

Merge pull request #99 from alademann/improved-prism-syntax-highlighting
Remove trailing space in Swig item template to enhance syntax highlighting

@HugoGiraudel HugoGiraudel merged commit faa4a43 into SassDoc:master Jul 12, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@HugoGiraudel

This comment has been minimized.

Show comment
Hide comment
@HugoGiraudel

HugoGiraudel Jul 12, 2014

Member

Agreed. Thanks Aaron. :)

Member

HugoGiraudel commented Jul 12, 2014

Agreed. Thanks Aaron. :)

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