Headings with lines to divide the page

This commit is contained in:
Magnus Åhall 2026-06-08 22:24:28 +02:00
parent 389c2fe69a
commit 805f7ae318
2 changed files with 37 additions and 7 deletions

View file

@ -114,7 +114,12 @@ export class MarkedPosition {
renderer: {
heading(token) {
const content = this.parser.parseInline(token.tokens)
return `<h${token.depth} ondblclick="setpos(event)" data-offset-start="${token.position.start.offset}" data-offset-end="${token.position.end.offset}">${content}</h${token.depth}>\n`
return `
<div class="heading-container">
<h${token.depth} ondblclick="setpos(event)" data-offset-start="${token.position.start.offset}" data-offset-end="${token.position.end.offset}">${content}</h${token.depth}>\n
<div class="line"></div>\n
</div>
`
},
paragraph(token) {