Add single tilde support to `StrikethroughSyntax` (dart-lang/markdown#595)
diff --git a/pkgs/markdown/lib/src/inline_syntaxes/strikethrough_syntax.dart b/pkgs/markdown/lib/src/inline_syntaxes/strikethrough_syntax.dart index ddb0eef..ebe5e1a 100644 --- a/pkgs/markdown/lib/src/inline_syntaxes/strikethrough_syntax.dart +++ b/pkgs/markdown/lib/src/inline_syntaxes/strikethrough_syntax.dart
@@ -13,6 +13,6 @@ requiresDelimiterRun: true, allowIntraWord: true, startCharacter: $tilde, - tags: [DelimiterTag('del', 2)], + tags: [DelimiterTag('del', 1), DelimiterTag('del', 2)], ); }
diff --git a/pkgs/markdown/test/gfm/strikethrough_extension.unit b/pkgs/markdown/test/gfm/strikethrough_extension.unit index be4d41c..0d6f75f 100644 --- a/pkgs/markdown/test/gfm/strikethrough_extension.unit +++ b/pkgs/markdown/test/gfm/strikethrough_extension.unit
@@ -9,3 +9,11 @@ <<< <p>This ~~has a</p> <p>new paragraph~~.</p> +>>> single tilde +~Hi~ there. +<<< +<p><del>Hi</del> there.</p> +>>> single tilde with double tilde +~Hi~~ there. +<<< +<p><del>Hi</del>~ there.</p>