int endOffset = fCurrentPosition - 2;
Object[] objs = createParameterMap(fSource, startTemplatePosition, fCurrentPosition - startTemplatePosition - 2);
String templateName = ((String) objs[1]);
@SuppressWarnings("unchecked")
List<String> parts = (List<String>) objs[0];
ITemplateFunction templateFunction = null;
int currOffset = 0;
if (templateName.startsWith("subst:")) {
templateFunction = Subst.CONST;
currOffset = 6;
} else if (templateName.startsWith("safesubst:")) {
templateFunction = Safesubst.CONST;
currOffset = 10;
} else {
return false;
}
parts.set(0, templateName.substring(currOffset));
plainContent = templateFunction.parseFunction(parts, fWikiModel, fSource, startTemplatePosition + currOffset, endOffset, false);
fCurrentPosition = endPosition;
if (plainContent != null) {
writer.append(plainContent);
return true;
}