Closed ben519 closed 8 months ago
Yeah this is due to the display: grid
option.
That's what this part fixes, which you saw in the other issue:
onVisitLine(node: { children: string | any[] }) {
// Prevent lines from collapsing in `display: grid` mode, and allow empty
// lines to be copy/pasted
if (node.children.length === 0) {
node.children = [{ type: "text", value: " " }]
}
},
This is done internally for the grid: true
option, but I think it's skipped for plaintext
language, since it returns early to avoid highlighting...
btw, thank you for the offer, but I don't have a GitHub Sponsor page set up
Thanks for the quick patch! If you set up a sponsor page, let me know.
When I set the language to plaintext, it loses formatting and copy-paste'ability regarding empty lines. For example,