Search in sources :

Example 1 with PreserverHtmlEntityToken

use of org.eclipse.mylyn.wikitext.markdown.internal.token.PreserverHtmlEntityToken in project mylyn.docs by eclipse.

the class MarkdownLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    // HTML entities are preserved
    tokenSyntax.add(new PreserverHtmlEntityToken());
    // inline links have to be handled as tokens, as they can be embedded in phrases
    tokenSyntax.add(new InlineLinkReplacementToken());
    tokenSyntax.add(new InlineImageReplacementToken());
    // two or more spaces at end of line force a line break
    // $NON-NLS-1$
    tokenSyntax.add(new PatternLineBreakReplacementToken("( {2,})$"));
}
Also used : PreserverHtmlEntityToken(org.eclipse.mylyn.wikitext.markdown.internal.token.PreserverHtmlEntityToken) InlineImageReplacementToken(org.eclipse.mylyn.wikitext.markdown.internal.token.InlineImageReplacementToken) PatternLineBreakReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken) InlineLinkReplacementToken(org.eclipse.mylyn.wikitext.markdown.internal.token.InlineLinkReplacementToken)

Aggregations

InlineImageReplacementToken (org.eclipse.mylyn.wikitext.markdown.internal.token.InlineImageReplacementToken)1 InlineLinkReplacementToken (org.eclipse.mylyn.wikitext.markdown.internal.token.InlineLinkReplacementToken)1 PreserverHtmlEntityToken (org.eclipse.mylyn.wikitext.markdown.internal.token.PreserverHtmlEntityToken)1 PatternLineBreakReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken)1