use of org.apache.wiki.parser.JSPWikiMarkupParser in project jspwiki by apache.
the class CreoleRendererTest method render.
private String render(String s) throws IOException {
WikiPage dummyPage = new WikiPage(m_testEngine, "TestPage");
WikiContext ctx = new WikiContext(m_testEngine, dummyPage);
StringReader in = new StringReader(s);
JSPWikiMarkupParser p = new JSPWikiMarkupParser(ctx, in);
WikiDocument d = p.parse();
CreoleRenderer cr = new CreoleRenderer(ctx, d);
return cr.getString();
}
use of org.apache.wiki.parser.JSPWikiMarkupParser in project jspwiki by apache.
the class WysiwygEditingRendererTest method render.
private String render(String s) throws IOException {
WikiPage dummyPage = new WikiPage(testEngine, "TestPage");
WikiContext ctx = new WikiContext(testEngine, dummyPage);
StringReader in = new StringReader(s);
JSPWikiMarkupParser p = new JSPWikiMarkupParser(ctx, in);
WikiDocument d = p.parse();
WysiwygEditingRenderer wer = new WysiwygEditingRenderer(ctx, d);
return wer.getString();
}
use of org.apache.wiki.parser.JSPWikiMarkupParser in project jspwiki by apache.
the class CounterPluginTest method translate.
private String translate(String src) throws IOException, NoRequiredPropertyException, ServletException {
WikiContext context = new WikiContext(testEngine, new WikiPage(testEngine, "TestPage"));
MarkupParser p = new JSPWikiMarkupParser(context, new StringReader(src));
WikiDocument dom = p.parse();
WikiRenderer r = new XHTMLRenderer(context, dom);
return r.getString();
}
Aggregations