Skip to content

Commit 3831536

Browse files
committed
Don’t highlight the syntax of the CoffeeScript side of the embedded JavaScript examples
1 parent 98ff456 commit 3831536

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Cakefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ codeFor = ->
5656
js = fs.readFileSync "docs/v#{majorVersion}/examples/#{file}.js", 'utf-8'
5757
js = js.replace /^\/\/ generated.*?\n/i, ''
5858

59-
cshtml = "<pre><code>#{hljs.highlight('coffeescript', cs).value}</code></pre>"
59+
if file in ['embedded', 'embedded_block', 'embedded_escaped']
60+
cshtml = "<pre><code>#{cs}</code></pre>"
61+
else
62+
cshtml = "<pre><code>#{hljs.highlight('coffeescript', cs).value}</code></pre>"
6063
# Temporary fix until highlight.js adds support for newer CoffeeScript keywords
6164
# Added in https://github.com/isagalaev/highlight.js/pull/1357, awaiting release
6265
if file in ['generators', 'modules']

0 commit comments

Comments
 (0)