Skip to content

Commit

Permalink
inlineCode: fix overzealous replacement
Browse files Browse the repository at this point in the history
$1 only refers to the parens in the first branch of the `` /^ ( *` *) $|^ ( *`)|(` *) $/g `` disjunction. If another branch matches, the replacement will be blank.
  • Loading branch information
Alcaro authored and ariabuckles committed Sep 19, 2019
1 parent 01bcc3e commit bdf0427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ var LIST_ITEM_R = new RegExp(
"gm"
);
var BLOCK_END_R = /\n{2,}$/;
var INLINE_CODE_ESCAPE_BACKTICKS_R = /^ ( *` *) $|^ ( *`)|(` *) $/g;
var INLINE_CODE_ESCAPE_BACKTICKS_R = /^ (?= *`)|(` *) $/g;
// recognize the end of a paragraph block inside a list item:
// two or more newlines at end end of the item
var LIST_BLOCK_END_R = BLOCK_END_R;
Expand Down

0 comments on commit bdf0427

Please sign in to comment.