19 package org.turro.parser.wiki;
21 import java.util.ArrayList;
22 import java.util.List;
23 import org.turro.elephant.context.Application;
24 import org.turro.elephant.context.ElephantContext;
25 import org.turro.elephant.context.IConstructor;
26 import org.turro.elephant.impl.util.Parser;
27 import org.turro.wiki.WikiParser;
28 import org.turro.wiki.WikiResult;
29 import org.turro.wiki.parsing.IWikiResolver;
40 WikiResult result = WikiParser.instance()
42 .addResolvers(resolvers)
44 html = result.getHtml();
48 for(IWikiResolver
resolver : resolvers) {
55 return (preview ? styleSheets() :
"") +
html;
60 private boolean elWiki;
77 this.constructor = constructor;
82 if(constructor ==
null) {
90 private final List<IWikiResolver> resolvers =
new ArrayList<>();
99 private String styleSheets() {
100 return "<link rel=\"stylesheet\" type=\"text/css\" href=\"" +
115 private final String source;
116 private final boolean preview;
119 this.source = source;
120 this.preview = preview;
121 this.elWiki = WikiParser.isElWiki(source);
IConstructor getConstructor()
static Application getApplication()
static String getRootWebPath()
void setResolver(ExternalResolver resolver)
WikiCompiler resolver(IWikiResolver resolver)
static WikiCompiler preview(String source)
static WikiCompiler source(String source)
WikiCompiler constructor(IConstructor constructor)
static WikiProcessors instance()