public interface BlockEmitter
public void emitBlock(StringBuilder out, List<String> lines, String meta)
{
out.append("<pre><code>");
for(final String s : lines)
{
for(int i = 0; i < s.length(); i++)
{
final char c = s.charAt(i);
switch(c)
{
case '&':
out.append("&");
break;
case '<':
out.append("<");
break;
case '>':
out.append(">");
break;
default:
out.append(c);
break;
}
}
out.append('\n');
}
out.append("</code></pre>\n");
}
| Modifier and Type | Method and Description |
|---|---|
void |
emitBlock(StringBuilder out,
List<String> lines,
String meta)
This method is responsible for outputting a markdown block and for any
needed pre-processing like escaping HTML special characters.
|
void emitBlock(StringBuilder out, List<String> lines, String meta)
out - The StringBuilder to append tolines - List of linesmeta - Meta information as a single String (if any) or empty StringCopyright © 2016. All Rights Reserved.