Skip to content
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

Update highlight.js call in prerender to use highlight 10.7.0 #804

Merged
merged 1 commit into from
Mar 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/converter/html/prerender.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function js_prerender_highlight(hs::String)::String
# un-escape code string
cs = html_unescape(cs) |> escape_string
# add to content of jsbuffer
write(jsbuffer, """console.log("<pre><code class=\\"$lang hljs\\">" + hljs.highlight("$lang", "$cs").value + "</code></pre>");""")
write(jsbuffer, """console.log("<pre><code class=\\"$lang hljs\\">" + hljs.highlight("$cs", {'language': "$lang"}).value + "</code></pre>");""")
# in between every block, write $splitter so that output can be split easily
i == length(matches)-1 || write(jsbuffer, """console.log('$splitter');""")
end
Expand Down