Add more test cases for trailing spaces.

This commit is contained in:
David Anson 2022-06-13 22:53:48 -07:00
parent ac38a614e9
commit 28b273e798
5 changed files with 106 additions and 4 deletions

View file

@ -38,7 +38,7 @@ module.exports = {
const tokenLines = params.lines.slice(token.map[0], token.map[1]);
forEachInlineCodeSpan(tokenLines.join("\n"), (code, lineIndex) => {
const codeLineCount = code.split(newLineRe).length;
for (let i = 0; i < codeLineCount; i++) {
for (let i = 0; i < codeLineCount - 1; i++) {
codeInlineLineNumbers.push(token.lineNumber + lineIndex + i);
}
});
@ -67,7 +67,7 @@ module.exports = {
lineNumber,
"Expected: " + (expected === 0 ? "" : "0 or ") +
expected + "; Actual: " + trailingSpaces,
null,
undefined,
[ column, trailingSpaces ],
{
"editColumn": column,