public class Safesubst extends AbstractTemplateFunction
{{safesubst: ... }}. See
Wikipedia-Help:Substitution| Modifier and Type | Field and Description |
|---|---|
static ITemplateFunction |
CONST |
| Constructor and Description |
|---|
Safesubst() |
| Modifier and Type | Method and Description |
|---|---|
String |
parseFunction(List<String> parts1,
IWikiModel model,
char[] src,
int beginIndex,
int endIndex,
boolean isSubst)
Parse a template function (like for example
{{ #if: ... |
static String |
parsePreprocess(String content,
IWikiModel model,
Map<String,String> templateParameterMap)
Parse the preprocess step for the given content string with the template
parser and
Utils#trimNewlineLeft() the resulting string. |
getFunctionDoc, parse, parseTrimpublic static final ITemplateFunction CONST
public String parseFunction(List<String> parts1, IWikiModel model, char[] src, int beginIndex, int endIndex, boolean isSubst)
AbstractTemplateFunction{{ #if: ... }}).
The result is also a text string in Wikipedia syntax notation which will be
parsed again (recursively) in the TemplateParser step.parseFunction in interface ITemplateFunctionparseFunction in class AbstractTemplateFunctionparts1 - the parser function arguments (extracted from the wiki text by
splitting the string at the pipe symbol ´|´)model - the wiki modelsrc - the array of the current Wikipedia source text.beginIndex - the beginning index, inclusive.endIndex - the ending index, exclusive.isSubst - if true the template function was called from
subst or safesubst function and the arguments of
the function are typically not parsed recursively.null if
the parsing fails or isn't valid.TemplateParser#parseTemplate(StringBuffer)public static String parsePreprocess(String content, IWikiModel model, Map<String,String> templateParameterMap)
Utils#trimNewlineLeft() the resulting string.content - model - Copyright © 2017 Java Wikipedia API (Bliki engine). All rights reserved.