Kawai Wiki

Compare Revisions

Ignore whitespace Rev 194 → Rev 195

/trunk/src/main/java/org/kawai/tag/kcode/Code.java
15,8 → 15,8
*/
public class Code implements KCode {
 
/**
* {@inheritDoc}
/**
* {@inheritDoc}.
*/
@Override
public boolean hasBody() {
54,12 → 54,22
return sb.toString();
}
 
/**
* Escapes the angle brackets.
* @param html String
* @return String
*/
private String escapeAngleBrackets(String html) {
String s = Regex.sub(html, "s/\\</\\&lt\\;/g");
s = Regex.sub(s, "s/\\>/\\&gt\\;/g");
return s;
}
 
/**
* Builds the tag for syntax highlight.
* @param map Map<String, String>
* @return String
*/
private static String buildOpenShTag(Map<String, String> map) {
StringBuilder sb = new StringBuilder(256);
sb.append("<pre class=\"");
74,7 → 84,7
}
map.remove("highlight");
Iterator<String> iter = map.keySet().iterator();
while(iter.hasNext()) {
while (iter.hasNext()) {
String name = iter.next();
if (name.equals("ul")) continue;
String value = map.get(name);