use of org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken in project mylyn.docs by eclipse.
the class MediaWikiLanguage method addStandardTokens.
@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
tokenSyntax.add(new LineBreakToken());
// $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"));
tokenSyntax.add(new ImageReplacementToken());
tokenSyntax.add(new HyperlinkInternalReplacementToken());
tokenSyntax.add(new HyperlinkExternalReplacementToken());
tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
// horizontal rule //$NON-NLS-1$ //$NON-NLS-2$
tokenSyntax.add(new PatternLiteralReplacementToken("(?:(?<=^|\\w\\s)(----)(?=$|\\s\\w))", "<hr/>"));
tokenSyntax.add(new org.eclipse.mylyn.wikitext.mediawiki.internal.token.EntityReferenceReplacementToken());
}
use of org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken in project mylyn.docs by eclipse.
the class TextileLanguage method addStandardTokens.
@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
// $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"));
tokenSyntax.add(new FootnoteReferenceReplacementToken());
if (configuration == null || !configuration.isOptimizeForRepositoryUsage()) {
ResourceBundle res = ResourceBundle.getBundle(BUNDLE_NAME, configuration == null || configuration.getLocale() == null ? Locale.ENGLISH : configuration.getLocale());
tokenSyntax.add(new // $NON-NLS-1$//$NON-NLS-2$
EntityWrappingReplacementToken(// $NON-NLS-1$//$NON-NLS-2$
"\"", // $NON-NLS-1$//$NON-NLS-2$
res.getString("quote_left"), // $NON-NLS-1$
res.getString("quote_right")));
tokenSyntax.add(new // $NON-NLS-1$//$NON-NLS-2$
EntityWrappingReplacementToken(// $NON-NLS-1$//$NON-NLS-2$
"'", // $NON-NLS-1$//$NON-NLS-2$
res.getString("singlequote_left"), // $NON-NLS-1$
res.getString("singlequote_right")));
// apostrophe //$NON-NLS-1$ //$NON-NLS-2$
tokenSyntax.add(new PatternEntityReferenceReplacementToken("(?:(?<=\\w)(')(?=\\w))", "#8217"));
}
// emdash //$NON-NLS-1$ //$NON-NLS-2$
tokenSyntax.add(new PatternEntityReferenceReplacementToken("(?:(--)(?=\\s\\w))", "#8212"));
// endash //$NON-NLS-1$ //$NON-NLS-2$
tokenSyntax.add(new PatternEntityReferenceReplacementToken("(?:(?<=\\w\\s)(-)(?=\\s\\w))", "#8211"));
// mul //$NON-NLS-1$ //$NON-NLS-2$
tokenSyntax.add(new PatternEntityReferenceReplacementToken("(?:(?<=\\d\\s)(x)(?=\\s\\d))", "#215"));
if (configuration == null || !configuration.isOptimizeForRepositoryUsage()) {
tokenSyntax.add(new AcronymReplacementToken());
}
tokenSyntax.add(new EntityReplacementToken());
}
use of org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken in project mylyn.docs by eclipse.
the class TWikiLanguage method addStandardTokens.
@Override
protected void addStandardTokens(PatternBasedSyntax tokenSyntax) {
// IMPORTANT NOTE: Most items below have order dependencies. DO NOT REORDER ITEMS BELOW!!
// $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"));
tokenSyntax.add(new LinkReplacementToken());
tokenSyntax.add(new ImpliedHyperlinkReplacementToken());
tokenSyntax.add(new ImpliedEmailLinkReplacementToken());
tokenSyntax.add(new WikiWordReplacementToken());
tokenSyntax.add(new IconReplacementToken());
literalTokenSyntax.add(new ImpliedHyperlinkReplacementToken());
}
use of org.eclipse.mylyn.wikitext.parser.markup.token.EntityReferenceReplacementToken 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());
}
Aggregations