Search in sources :

Example 1 with AsciiDocLanguage

use of org.eclipse.mylyn.wikitext.asciidoc.AsciiDocLanguage in project mylyn.docs by eclipse.

the class AsciiDocIdGenerationStrategy method parseToHtml.

private static String parseToHtml(String markup) {
    MarkupParser localParser = new MarkupParser(new AsciiDocLanguage());
    StringWriter out = new StringWriter();
    HtmlDocumentBuilder builder = new HtmlDocumentBuilder(out);
    builder.setEmitAsDocument(false);
    localParser.setBuilder(builder);
    localParser.parse(markup);
    return out.toString();
}
Also used : StringWriter(java.io.StringWriter) AsciiDocLanguage(org.eclipse.mylyn.wikitext.asciidoc.AsciiDocLanguage) HtmlDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder) MarkupParser(org.eclipse.mylyn.wikitext.parser.MarkupParser)

Aggregations

StringWriter (java.io.StringWriter)1 AsciiDocLanguage (org.eclipse.mylyn.wikitext.asciidoc.AsciiDocLanguage)1 MarkupParser (org.eclipse.mylyn.wikitext.parser.MarkupParser)1 HtmlDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder)1