Skip to content

Commit e6ea336

Browse files
authored
Add single tilde support to StrikethroughSyntax (dart-archive/markdown#595)
1 parent 6ead60a commit e6ea336

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pkgs/markdown/lib/src/inline_syntaxes/strikethrough_syntax.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ class StrikethroughSyntax extends DelimiterSyntax {
1313
requiresDelimiterRun: true,
1414
allowIntraWord: true,
1515
startCharacter: $tilde,
16-
tags: [DelimiterTag('del', 2)],
16+
tags: [DelimiterTag('del', 1), DelimiterTag('del', 2)],
1717
);
1818
}

pkgs/markdown/test/gfm/strikethrough_extension.unit

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ new paragraph~~.
99
<<<
1010
<p>This ~~has a</p>
1111
<p>new paragraph~~.</p>
12+
>>> single tilde
13+
~Hi~ there.
14+
<<<
15+
<p><del>Hi</del> there.</p>
16+
>>> single tilde with double tilde
17+
~Hi~~ there.
18+
<<<
19+
<p><del>Hi</del>~ there.</p>

0 commit comments

Comments
 (0)