[Plugin: SyntaxHighlighter Evolved] Illegal filtering of generic java code tokens
-
Thanks for this great plugin, it’s great for attrative and readable code rendering.
Using Version 3.1.3 of the plugin, I stumpled into an issue:[sourcecode language="java"]
public class Aggregator <T> {}is rendered to
public class Aggregator {}
and thus mutilated to meaninglessness
the generic codetoken <T> is filtered away. I know can easily be interpreted as HTML-Syntax, but here it is part of legal java syntax.
It may be of interest, that after updating the wordpress post, the -Tag is removed from the text alltogehter.
Generic syntax came up with Java 1.5, can you please make a statement of compatility of the plugin and the supported java syntax versions.
When I try to use HTML-Escape tokens like < > the code
public class Aggregator < >
is still rendered to
public class Aggregator
the HTML escapes tokens are not displayed, but survive at least in the source text without being removed by any obsure hidden filtering. This is suggested as solution by
http://codex.ww.wp.xz.cn/Writing_Code_in_Your_Posts should generally help, but it fails here.You can check the erronous rendering at my blog at:
http://www.knowledgeware-consulting.ch/java/generic-types-and-generic-algorithmsMy idea of a syntax highligther is that of any coder. Code should be taken as literal text. No programm tokens should vanish. Only color formatting should be added. No extra preprocessing of the code should be necessary. The coders reputation should not be ruined by an syntax highlighter, that conseals some program tokens….I know this is no easy issue, interaction between wordpress renderer and the input and rendered output of the plugin may become quite complex.
Can you please resolve this issue.
Kind regards
Othmar Lippuner
PS: Sorry I now this is a nitty-gritty issue. I experienced it myself when writting this text here. At had to joggle quite a bit with these HTML escapes 😉 at least it’s not filtered out here….
The topic ‘[Plugin: SyntaxHighlighter Evolved] Illegal filtering of generic java code tokens’ is closed to new replies.