2
\$\begingroup\$

Becoming a Perl bandit, in this question I had to escape my regex expression \: to avoid funny syntaxing. Now on my newest Perl question, I encounter the same issue. Can this be fixed somehow?

  • 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?
\$\endgroup\$
2
  • \$\begingroup\$ I hate to be so cynical, but based on this question (and the absence of an answer) on Meta.SE, I have a feeling that syntax highlighting is pretty low on the priority list... \$\endgroup\$
    – Phrancis
    Nov 18, 2017 at 20:19
  • \$\begingroup\$ @Phrancis Thank you for the link, guess I should learn to live with it then. \$\endgroup\$
    – Ludisposed
    Nov 18, 2017 at 21:18

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .