简体   繁体   中英

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

在此输入图像描述

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

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

try inserting \\r right after the <

<script> document.write("List <\\rMap<\\rString,Object>> someVar = someMethod();"); </script>

the result I got was: List < Map< String,Object>> someVar = someMethod();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM