Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

Add single tilde support to StrikethroughSyntax #595

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Loading