fixup! Allow trailing spaces in code blocks

This commit is contained in:
Wouter Admiraal 2019-05-28 08:38:56 +02:00
parent 2e391a5ca1
commit 2722940f3c
3 changed files with 4 additions and 5 deletions

View file

@ -34,7 +34,7 @@ module.exports = {
forEachLine(lineMetadata(), (line, lineIndex, inCode, onFence) => {
inFencedCode += onFence;
const lineNumber = lineIndex + 1;
if ((!inCode || inFencedCode !== 0) && trailingSpaceRe.test(line) &&
if ((!inCode || inFencedCode) && trailingSpaceRe.test(line) &&
!includesSorted(listItemLineNumbers, lineNumber)) {
const actual = line.length - line.trimRight().length;
if (expected !== actual) {