simpleSyntaxes property
Similar to _defaultSyntaxes
, but it excludes _
and hard-line-break,
while including ~~
Implementation
static final simpleSyntaxes = <InlineSyntax>[
AutolinkSyntax(),
LinkSyntax(),
ImageSyntax(),
// Allow any punctuation to be escaped.
EscapeSyntax(),
// "*" surrounded by spaces is left alone.
TextSyntax(r' \* ', startCharacter: $space),
// "~" surrounded by spaces is left alone.
TextSyntax(r' ~ ', startCharacter: $space),
// Leave already-encoded HTML entities alone. Ensures we don't turn
// "&" into "&amp;"
TextSyntax(htmlEntityPattern, startCharacter: $ampersand),
// Encode "&".
TextSyntax(r'&', sub: '&', startCharacter: $ampersand),
// Encode "<".
TextSyntax(r'<', sub: '<', startCharacter: $lt),
// Encode ">". (Google calendar expects it)
TextSyntax(r'>', sub: '>', startCharacter: $gt),
// Parse "**strong**" tags.
// Parse "**strong**" and "*emphasis*" tags.
TagSyntax(r'\*+', requiresDelimiterRun: true),
StrikethroughSyntax(),
CodeSyntax(),
// We will add the LinkSyntax once we know about the specific link resolver.
];