Skip to content

Commit

Permalink
chore: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Dec 6, 2022
1 parent 5618e6c commit 9af3897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tokenizer.js
Expand Up @@ -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) {
Expand All @@ -334,7 +334,7 @@ export class Tokenizer {
return false;
});

list.loose = !!hasMultipleLineBreaks;
list.loose = hasMultipleLineBreaks;
}
}

Expand Down

0 comments on commit 9af3897

Please sign in to comment.