Skip to content

Commit 37b6a1a

Browse files
authored
add attribute support for setting the heading level
1 parent fb1bdb9 commit 37b6a1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ class MarkdownButtonElement extends HTMLElement {
4343
class MarkdownHeaderButtonElement extends MarkdownButtonElement {
4444
constructor() {
4545
super()
46-
styles.set(this, {prefix: '### '})
46+
styles.set(this, {
47+
prefix: '#'.repeat(this.getAttribute('level') || 3).' '
48+
});
4749
}
4850
}
4951

0 commit comments

Comments
 (0)