fix(tui): separate list items with blank lines in loose lists
This commit is contained in:
@@ -572,6 +572,7 @@ export class Markdown implements Component {
|
||||
|
||||
for (let i = 0; i < token.items.length; i++) {
|
||||
const item = token.items[i];
|
||||
const isLastItem = i === token.items.length - 1;
|
||||
const bullet = token.ordered
|
||||
? this.options.preserveOrderedListMarkers
|
||||
? (this.getOrderedListMarker(item) ?? `${startNumber + i}. `)
|
||||
@@ -604,6 +605,10 @@ export class Markdown implements Component {
|
||||
if (!renderedAnyLine) {
|
||||
lines.push(firstPrefix);
|
||||
}
|
||||
|
||||
if (token.loose && !isLastItem) {
|
||||
lines.push("");
|
||||
}
|
||||
}
|
||||
|
||||
return lines;
|
||||
|
||||
Reference in New Issue
Block a user