Skip to content

Commit

Permalink
Add single tilde support to StrikethroughSyntax (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguang authored Mar 8, 2024
1 parent 1ca5166 commit 1654801
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/inline_syntaxes/strikethrough_syntax.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class StrikethroughSyntax extends DelimiterSyntax {
requiresDelimiterRun: true,
allowIntraWord: true,
startCharacter: $tilde,
tags: [DelimiterTag('del', 2)],
tags: [DelimiterTag('del', 1), DelimiterTag('del', 2)],
);
}
8 changes: 8 additions & 0 deletions test/gfm/strikethrough_extension.unit
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ new paragraph~~.
<<<
<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>

0 comments on commit 1654801

Please sign in to comment.