Skip to content

Commit

Permalink
added support for Github style strike through with double tildes
Browse files Browse the repository at this point in the history
  • Loading branch information
chadbraunduin committed Oct 23, 2016
1 parent 280aeca commit 75d631e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion markdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ N
}
' "$temp_file"

# emphasis and strong emphasis
# emphasis and strong emphasis and strikethrough
sed -nri '
# batch up the entire stream of text until a line break in the action
/^$/b emphasis
Expand All @@ -280,6 +280,7 @@ s/\*\*(.+)\*\*/<strong>\1<\/strong>/g
s/__([^_]+)__/<strong>\1<\/strong>/g
s/\*([^\*]+)\*/<em>\1<\/em>/g
s/([^\\])_([^_]+)_/\1<em>\2<\/em>/g
s/\~\~(.+)\~\~/<strike>\1<\/strike>/g
p
' "$temp_file"

Expand Down
2 changes: 1 addition & 1 deletion samples/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ Yet another paragraph

blah


Sammy is ~~not~~ dead.

0 comments on commit 75d631e

Please sign in to comment.