The prettify syntax highlighter doesn't run in tag wiki pages (does run in edit preview page however). For example JSP and Servlets.

Update: I just encountered exactly the same problem again. For JSP and Servlets it works fine (although the JSP one should apply XML/HTML syntax highlighting rather than Java syntax highlighting, but that aside), but for Servlet Filters it doesn't work at all, while it does work in edit page. Does syntax highlighting need to be configured on a per-tag basis or so?

Update 2: the highlighter also doesn't run in JSTL info page where I'd expect XML-like syntax highlighting. After investigating the CSS it turns out that SO is using a tag-specific classname (which matches the most popular tag) to trigger language-specific syntax highlighting. I'd suggest to add a default classname which triggers automatic highlighting for the case that there's no match in tags.

That said, I'm also not very happy to see that JSP (and JSF) posts uses Java-targeted syntax highlighting. It should be using XML-targeted syntax highlighting (or better, automatic, since it's often a mix of Java code and XML-style code in those posts). However, most JSP questions are posted along with a [java] tag as well which causes the wrong syntax highlighter to be triggered. About half a year ago everything in JSP/JSF/JSTL tags was highlighted perfectly.

Or does that deserve another question?

  • Yerp, totally fixing this ASAP, you wrote some awesome wikis :) – waffles Sep 1 '10 at 4:00

This is sorted now, sorry about about it.

  • Unaccepted because the same problem occurred on other tag. Can you take a look once again? – BalusC Jan 19 '11 at 15:01
  • @BalusC ... will have a look – waffles Jan 27 '11 at 22:21
  • Thanks... JSF 2.0 has by the way also no default highlighting. stackoverflow.com/questions/4823216/jsf-2-0-form-using-get In preview page it looks perfect. Sob. – BalusC Jan 28 '11 at 0:02
  • @BalusC ... hmm I manually set it to XML ... but not really sure why I had to – waffles Jan 28 '11 at 0:27
  • Looks better. But why not just default? JSP/JSTL/JSF questions may contain a mix of Java code and XML style code. – BalusC Jan 28 '11 at 0:29
  • Like here, XML is fine, but Java is not highlighted. If you're unsure, who was then responsible for the change in syntax highlighting? You might delegate the job to him/her. – BalusC Jan 28 '11 at 0:54
  • @BaluC see here: meta.stackexchange.com/questions/72082/… - if you'd like to suggest new tags and language hints do so there. – Geoff Dalgas Jan 28 '11 at 1:01
  • @Geoff: ah, I've completely missed that. Thanks. – BalusC Jan 28 '11 at 15:57
  • Btw: I've reported it there, but no changes has taken place since then. What should happen? What do Jeff expect more? 10 votes or something? – BalusC Feb 22 '11 at 13:39

You must log in to answer this question.

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