01: package org.jamwiki.parser.bliki;
02:
03: import org.jamwiki.parser.ParserOutput;
04: import org.jamwiki.parser.ParserInput;
05: import org.jamwiki.parser.jflex.JFlexParser;
06:
07: public class BlikiParser extends JFlexParser {
08: public BlikiParser(ParserInput parserInput) {
09: super (parserInput);
10: }
11:
12: /**
13: * Parse text for online display.
14: */
15: public String parseHTML(String raw) throws Exception {
16: ParserOutput doc = new ParserOutput();
17:
18: String titlePrefix = "/jamwiki/" + parserInput.getVirtualWiki()
19: + '/';
20: JAMWikiModel wikiModel = new JAMWikiModel(parserInput, doc,
21: titlePrefix + "${image}", titlePrefix + "${title}");
22: String htmlStr = wikiModel.render(raw);
23: htmlStr = htmlStr == null ? "" : htmlStr;
24: return htmlStr;
25: }
26:
27: }
|