- Should I just escape them all?
- Go to google/code-prettify with the issue (doubtful if they do something about it)?
- Any other ideas? Maybe I'm missing something obvious?
It is commonly accepted wisdom that "Only
perl can parse Perl". Every syntax highlighter I have seen has bugs when highlighting Perl code, especially regexes.
I don't recommend modifying your code just to appease the syntax highlighter on Code Review. You can either mention at the end of the question that the syntax highlighter is sloppy, or just turn off syntax highlighting by putting
<!-- language: lang-none --> before your Perl code block.