Skip to content

Commit

Permalink
Fis whitespace check on strikethrough
Browse files Browse the repository at this point in the history
  • Loading branch information
karimatthews committed Jan 25, 2019
1 parent 5db078b commit dc595d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ J2M.prototype.to_markdown = function(str) {
// Subscript
.replace(/~([^~]*)~/g, '<sub>$1</sub>')
// Strikethrough
.replace(/\s+-(\S+.*?\S)-\s+/g, ' ~~$1~~ ')
.replace(/(\s|^)+-(\S+.*?\S)-+/g, '$1~~$2~~')
// Code Block
.replace(/\{code(:([a-z]+))?([:|]?(title|borderStyle|borderColor|borderWidth|bgColor|titleBGColor)=.+?)*\}([^]*)\{code\}/gm, '```$2$5```')
// Pre-formatted text
Expand Down

0 comments on commit dc595d3

Please sign in to comment.