diff --git a/src/Tokenizer.js b/src/Tokenizer.js index 3100c2579bf..21c0f20b542 100644 --- a/src/Tokenizer.js +++ b/src/Tokenizer.js @@ -319,7 +319,7 @@ export class Tokenizer { if (!list.loose) { // Check if list should be loose const spacers = list.items[i].tokens.filter(t => t.type === 'space'); - const hasMultipleLineBreaks = spacers.length && spacers.every(t => { + const hasMultipleLineBreaks = spacers.length > 0 && spacers.every(t => { const chars = t.raw.split(''); let lineBreaks = 0; for (const char of chars) { @@ -334,7 +334,7 @@ export class Tokenizer { return false; }); - list.loose = !!hasMultipleLineBreaks; + list.loose = hasMultipleLineBreaks; } }