Fix forEachInlineCodeSpan to handle lines ending with '\' better.

This commit is contained in:
David Anson 2019-09-25 21:59:37 -07:00
parent 33cb1a71ec
commit a5f03d02d0
3 changed files with 12 additions and 2 deletions

View file

@ -319,7 +319,8 @@ module.exports.forEachInlineCodeSpan =
currentLine++;
currentColumn = 0;
} else if ((char === "\\") &&
((startIndex === -1) || (startColumn === -1))) {
((startIndex === -1) || (startColumn === -1)) &&
(input[index + 1] !== "\n")) {
// Escape character outside code, skip next
index++;
currentColumn += 2;