1

In Delphi the \ does not escape a string ending, in Delphi if you want a ' you type:

StringVariable := 'Foo'' bar'; // comments

And it works as expected, but in an answer on StackOverflow I've always noticed a bug.

I've been able to create a small test case for this bug

StringVariable  := '\'; // comments

I think formatter has a preference for the c# / c style languages where the \ escapes the next char, so I'm not sure if this is a bug or a feature, this might even be a weird way of asking for a way to instruct the formatter that it's dealing Delphi...

0

It's open source -- submit a patch!

http://code.google.com/p/google-code-prettify/

  • should have checked out which library you used instead of assuming that just like mark-down you created a fork from a known library. Will check out how viable a patch is. – Davy Landman Jul 18 '09 at 7:05
2

Your last suggestion, to make the syntax highlighter language-aware, is the only fool-proof solution for this and similar problems. Hopefully one day this feature will be added to SO.

You must log in to answer this question.

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