Open GoogleCodeExporter opened 8 years ago
The reason is that both HTML and XML are parsed using the same lexer:
http://code.google.com/p/google-code-prettify/source/browse/trunk/src/prettify.j
s#1294
which detects <style> and <script> tags inside the markup
Original comment by amroamro...@gmail.com
on 22 May 2013 at 12:33
This becomes a bigger problem when the language is XAML because <Style> tags
are an important part of this language (and always contain XML). There are many
posts on Stack Overflow which are not formatted correctly due to this
behaviour. (And people use this code outside SO too, of course!)
Would it be a good idea to modify prettify.js so that:
a) lang-xaml is understood as a case for XML parsing
b) Special tag processing is removed in this case (<Script> is currently not part of the XAML lexicon, but keeping it in too seems anachronistic)?
Alternatively, I'm not sure that keeping this special processing for lang-XML
in the general case is desirable; perhaps just for lang-html, lang-xhtml, etc.?
Original comment by m.j.wind...@gmail.com
on 2 Jul 2015 at 10:36
Original issue reported on code.google.com by
markus.r...@googlemail.com
on 17 Apr 2013 at 1:27