use of org.eclipse.mylyn.wikitext.parser.markup.phrase.HtmlEndTagPhraseModifier in project mylyn.docs by eclipse.
the class TextileLanguage method addStandardPhraseModifiers.
@Override
protected void addStandardPhraseModifiers(PatternBasedSyntax phraseModifierSyntax) {
boolean escapingHtml = configuration == null ? false : configuration.isEscapingHtmlAndXml();
phraseModifierSyntax.add(new TagEscapeTextilePhraseModifier());
phraseModifierSyntax.add(new HtmlEndTagPhraseModifier(escapingHtml));
phraseModifierSyntax.add(new HtmlStartTagPhraseModifier(escapingHtml));
// $NON-NLS-1$
phraseModifierSyntax.beginGroup("(?:(?<=[\\s\\.,\\\"'?!;:\\)\\(\\{\\}\\[\\]])|^)(?:", 0);
phraseModifierSyntax.add(new EscapeTextilePhraseModifier());
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("**", SpanType.BOLD, Mode.NESTING));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("??", SpanType.CITATION, Mode.NESTING));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("__", SpanType.ITALIC, Mode.NESTING));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("_", SpanType.EMPHASIS, Mode.NESTING));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("*", SpanType.STRONG, Mode.NESTING));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("+", SpanType.INSERTED, Mode.NESTING));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("~", SpanType.SUBSCRIPT, Mode.NORMAL));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("^", SpanType.SUPERSCRIPT, Mode.NORMAL));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("@", SpanType.CODE, Mode.SPECIAL));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("%", SpanType.SPAN, Mode.NESTING));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimpleTextilePhraseModifier("-", SpanType.DELETED, Mode.NESTING));
phraseModifierSyntax.add(new ImageTextilePhraseModifier());
// hyperlinks are actually a phrase modifier see bug 283093
phraseModifierSyntax.add(new HyperlinkPhraseModifier());
// $NON-NLS-1$
phraseModifierSyntax.endGroup(")(?=\\W|$)", 0);
}
use of org.eclipse.mylyn.wikitext.parser.markup.phrase.HtmlEndTagPhraseModifier 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());
}
use of org.eclipse.mylyn.wikitext.parser.markup.phrase.HtmlEndTagPhraseModifier in project mylyn.docs by eclipse.
the class MarkdownLanguage method addStandardPhraseModifiers.
@Override
protected void addStandardPhraseModifiers(PatternBasedSyntax phraseModifierSyntax) {
// inline HTML
phraseModifierSyntax.add(new HtmlEndTagPhraseModifier());
phraseModifierSyntax.add(new HtmlStartTagPhraseModifier());
// images
phraseModifierSyntax.add(new InlineImageReplacementToken());
phraseModifierSyntax.add(new ReferenceStyleImageReplacementToken());
// links
phraseModifierSyntax.add(new InlineLinkReplacementToken());
phraseModifierSyntax.add(new ReferenceStyleLinkReplacementToken());
phraseModifierSyntax.add(new AutomaticLinkReplacementToken());
// backslash escaped span elements
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("**"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("__"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("*"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("_"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("\\"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("`"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("{"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("}"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("["));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("]"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("("));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier(")"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("#"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("+"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("-"));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("."));
// $NON-NLS-1$
phraseModifierSyntax.add(new BackslashEscapePhraseModifier("!"));
// emphasis span elements
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("``", SpanType.CODE));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("`", SpanType.CODE));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("**", SpanType.STRONG));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("__", SpanType.STRONG));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("*", SpanType.EMPHASIS));
// $NON-NLS-1$
phraseModifierSyntax.add(new SimplePhraseModifier("_", SpanType.EMPHASIS));
}
Aggregations