javahtmlgoogle-code-prettify

problems with google code prettify for printing java code having code like List<Map<String,Object>>


I'm trying to print below line on html page:

List<Map<String,Object>> someVar = someMethod();

however, in html Map<String,Object> is being treated as tag in html

Below is the output I'm getting:

List> someVar = someMethod();

everything else other than Map is being properly replaced by span tags

enter image description here


Solution

  • replace < by &lt; and > by &gt;

    List&lt;Map&lt;String,Object&gt;&gt; someVar = someMethod();