Skip to content

Commit fde4948

Browse files
authored
Merge pull request #455 from camdencheek/support-single-tilde-strikethrough
GitHub flavored markdown: support single-tilde strikethrough
2 parents c15e394 + 9c09ae0 commit fde4948

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

extension/_test/strikethrough.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ new paragraph~~.
1616
<p>This ~~has a</p>
1717
<p>new paragraph~~.</p>
1818
//= = = = = = = = = = = = = = = = = = = = = = = =//
19+
20+
21+
22+
3
23+
//- - - - - - - - -//
24+
~Hi~ Hello, world!
25+
//- - - - - - - - -//
26+
<p><del>Hi</del> Hello, world!</p>
27+
//= = = = = = = = = = = = = = = = = = = = = = = =//

extension/strikethrough.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (s *strikethroughParser) Trigger() []byte {
4646
func (s *strikethroughParser) Parse(parent gast.Node, block text.Reader, pc parser.Context) gast.Node {
4747
before := block.PrecendingCharacter()
4848
line, segment := block.PeekLine()
49-
node := parser.ScanDelimiter(line, before, 2, defaultStrikethroughDelimiterProcessor)
49+
node := parser.ScanDelimiter(line, before, 1, defaultStrikethroughDelimiterProcessor)
5050
if node == nil {
5151
return nil
5252
}

0 commit comments

Comments
 (0)