Skip to content

Commit 31450e0

Browse files
authored
Merge pull request #3228 from metacpan/haarg/fix-perlsecret-again
work around syntaxhighlighter bug causing empty blocks on perlsecret
2 parents c6f5789 + 16f077c commit 31450e0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

root/static/js/syntaxhighlighter.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ SyntaxHighlighter.regexLib['url'] = /[a-z][a-z0-9.+-]*:\/\/[\w-./?%&=:@;#~]*[\w-
8585
// Use regular spaces, not  
8686
SyntaxHighlighter.config.space = ' ';
8787

88+
// We aren't using <script type="syntaxhighlighter" />, and when enabled it
89+
// attempts to strip <![CDATA[ ]]> sections. That code is buggy, and breaks
90+
// short code blocks, such as on perlsecret.pod
91+
SyntaxHighlighter.config.useScriptTags = false;
92+
8893
// https://metacpan.org/source/RWSTAUNER/Acme-Syntax-Examples-0.001/lib/Acme/Syntax/Examples.pm
8994

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

0 commit comments

Comments
 (0)