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

@ -1833,7 +1833,7 @@ module.exports.includesSorted = function includesSorted(test) {
};
module.exports.forEachInlineCodeSpan = function forEachInlineCodeSpan(test) {
test.expect(94);
test.expect(99);
const testCases =
[
[
@ -1916,6 +1916,10 @@ module.exports.forEachInlineCodeSpan = function forEachInlineCodeSpan(test) {
[
"text \\` text `code`",
[ [ "code", 0, 14, 1 ] ]
],
[
"text\\\n`code`",
[ [ "code", 1, 1, 1 ] ]
]
];
testCases.forEach((testCase) => {