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

work around syntaxhighlighter bug causing empty blocks on perlsecret #3228

Merged
merged 1 commit into from
Nov 13, 2024
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
5 changes: 5 additions & 0 deletions root/static/js/syntaxhighlighter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ SyntaxHighlighter.regexLib['url'] = /[a-z][a-z0-9.+-]*:\/\/[\w-./?%&=:@;#~]*[\w-
// Use regular spaces, not  
SyntaxHighlighter.config.space = ' ';

// We aren't using <script type="syntaxhighlighter" />, and when enabled it
// attempts to strip <![CDATA[ ]]> sections. That code is buggy, and breaks
// short code blocks, such as on perlsecret.pod
SyntaxHighlighter.config.useScriptTags = false;

// https://metacpan.org/source/RWSTAUNER/Acme-Syntax-Examples-0.001/lib/Acme/Syntax/Examples.pm

// TODO: Might be easier to do the regexp on the plain string (before
Expand Down