Search in sources :

Example 1 with PatternLineBreakReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken in project mylyn.docs by eclipse.

the class AsciiDocLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    // HTML entities are preserved
    tokenSyntax.add(new PreserverHtmlEntityToken());
    // line ending with a + will cause a line Break
    // $NON-NLS-1$
    tokenSyntax.add(new PatternLineBreakReplacementToken("(\\s\\+)\\s*$"));
}
Also used : PreserverHtmlEntityToken(org.eclipse.mylyn.wikitext.asciidoc.internal.token.PreserverHtmlEntityToken) PatternLineBreakReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken)

Example 2 with PatternLineBreakReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken in project mylyn.docs by eclipse.

the class CreoleLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    // IMPORTANT NOTE: Most items below have order dependencies.  DO NOT REORDER ITEMS BELOW!!
    // line break //$NON-NLS-1$
    tokenSyntax.add(new PatternLineBreakReplacementToken("(\\\\\\\\)"));
    tokenSyntax.add(new LinkReplacementToken());
    tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
}
Also used : PatternLineBreakReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken) LinkReplacementToken(org.eclipse.mylyn.wikitext.creole.internal.token.LinkReplacementToken) ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken)

Example 3 with PatternLineBreakReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken 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)

Example 4 with PatternLineBreakReplacementToken

use of org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken in project mylyn.docs by eclipse.

the class ConfluenceLanguage method addStandardTokens.

@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
    // line break //$NON-NLS-1$
    tokenSyntax.add(new PatternLineBreakReplacementToken("(\\\\\\\\ ?)"));
    // ORDER DEPENDENCY must come after line break
    tokenSyntax.add(new EscapedCharacterReplacementToken());
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(tm)", "#8482"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(TM)", "#8482"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(c)", "#169"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(C)", "#169"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(r)", "#174"));
    // $NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new EntityReferenceReplacementToken("(R)", "#174"));
    // emdash //$NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new PatternEntityReferenceReplacementToken("(?:(?<=(?:\\w\\s)|^)(---)(?=\\s\\w))", "#8212"));
    // endash //$NON-NLS-1$ //$NON-NLS-2$
    tokenSyntax.add(new PatternEntityReferenceReplacementToken("(?:(?<=(?:\\w\\s)|^)(--)(?=\\s\\w))", "#8211"));
    tokenSyntax.add(new HorizontalRuleToken());
    tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
    tokenSyntax.add(new AnchorReplacementToken());
    tokenSyntax.add(new NumericEntityReferenceReplacementToken());
}
Also used : NumericEntityReferenceReplacementToken(org.eclipse.mylyn.wikitext.confluence.internal.token.NumericEntityReferenceReplacementToken) NumericEntityReferenceReplacementToken(org.eclipse.mylyn.wikitext.confluence.internal.token.NumericEntityReferenceReplacementToken) EntityReferenceReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken) PatternEntityReferenceReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternEntityReferenceReplacementToken) PatternEntityReferenceReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternEntityReferenceReplacementToken) PatternLineBreakReplacementToken(org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken) HorizontalRuleToken(org.eclipse.mylyn.wikitext.confluence.internal.token.HorizontalRuleToken) ImpliedHyperlinkReplacementToken(org.eclipse.mylyn.wikitext.confluence.internal.token.ImpliedHyperlinkReplacementToken) EscapedCharacterReplacementToken(org.eclipse.mylyn.wikitext.confluence.internal.token.EscapedCharacterReplacementToken) AnchorReplacementToken(org.eclipse.mylyn.wikitext.confluence.internal.token.AnchorReplacementToken)

Aggregations

PatternLineBreakReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.PatternLineBreakReplacementToken)4 PreserverHtmlEntityToken (org.eclipse.mylyn.wikitext.asciidoc.internal.token.PreserverHtmlEntityToken)1 AnchorReplacementToken (org.eclipse.mylyn.wikitext.confluence.internal.token.AnchorReplacementToken)1 EscapedCharacterReplacementToken (org.eclipse.mylyn.wikitext.confluence.internal.token.EscapedCharacterReplacementToken)1 HorizontalRuleToken (org.eclipse.mylyn.wikitext.confluence.internal.token.HorizontalRuleToken)1 ImpliedHyperlinkReplacementToken (org.eclipse.mylyn.wikitext.confluence.internal.token.ImpliedHyperlinkReplacementToken)1 NumericEntityReferenceReplacementToken (org.eclipse.mylyn.wikitext.confluence.internal.token.NumericEntityReferenceReplacementToken)1 LinkReplacementToken (org.eclipse.mylyn.wikitext.creole.internal.token.LinkReplacementToken)1 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 EntityReferenceReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken)1 ImpliedHyperlinkReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.ImpliedHyperlinkReplacementToken)1 PatternEntityReferenceReplacementToken (org.eclipse.mylyn.wikitext.parser.markup.token.PatternEntityReferenceReplacementToken)1