use of org.eclipse.mylyn.wikitext.twiki.internal.phrase.AutoLinkSwitchPhraseModifier in project mylyn.docs by eclipse.
the class TWikiLanguage method addStandardPhraseModifiers.
@Override
protected void addStandardPhraseModifiers(PatternBasedSyntax phraseModifierSyntax) {
// IMPORTANT NOTE: Most items below have order dependencies. DO NOT REORDER ITEMS BELOW!!
boolean escapingHtml = configuration == null ? false : configuration.isEscapingHtmlAndXml();
phraseModifierSyntax.add(new AutoLinkSwitchPhraseModifier());
if (!escapingHtml) {
phraseModifierSyntax.add(new HtmlStartTagPhraseModifier());
phraseModifierSyntax.add(new HtmlEndTagPhraseModifier());
}
// $NON-NLS-1$
phraseModifierSyntax.beginGroup("(?:(?<=[\\s\\.,\\\"'?!;:\\)\\(\\{\\}\\[\\]])|^)(?:", 0);
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("*", SpanType.BOLD));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("__", new SpanType[] { SpanType.BOLD, SpanType.ITALIC }));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("_", SpanType.ITALIC));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("==", new SpanType[] { SpanType.BOLD, SpanType.MONOSPACE }));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("=", SpanType.MONOSPACE));
// $NON-NLS-1$
phraseModifierSyntax.endGroup(")(?=\\W|$)", 0);
literalPhraseModifierSyntax.add(new HtmlStartTagPhraseModifier());
literalPhraseModifierSyntax.add(new HtmlEndTagPhraseModifier());
}
Aggregations