Skip to content

Commit

Permalink
Fixed #95: Corrected strikethrough pattern and added to test fixture.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsajip authored and lepture committed Apr 8, 2016
1 parent 9c15c0f commit 1076727
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mistune.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class InlineGrammar(object):
)
code = re.compile(r'^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)') # `code`
linebreak = re.compile(r'^ {2,}\n(?!\s*$)')
strikethrough = re.compile(r'^~{2}([\s\S]+?)~{2}(?!~)') # ~~word~~
strikethrough = re.compile(r'^~~(?=\S)([\s\S]*?\S)~~') # ~~word~~
footnote = re.compile(r'^\[\^([^\]]+)\]')
text = re.compile(r'^[\s\S]+?(?=[\\<!\[_*`~]|https?://| {2,}\n|$)')

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/extra/gfm_del.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>hello <del>hi</del> world</p>
<p>hello <del>hi</del> world <del>how</del> are <del>you</del> ~~ today~~?</p>
2 changes: 1 addition & 1 deletion tests/fixtures/extra/gfm_del.text
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hello ~~hi~~ world
hello ~~hi~~ world ~~how~~ are ~~you~~ ~~ today~~?

0 comments on commit 1076727

Please sign in to comment.