Skip to content

Commit

Permalink
Show hr after FrontMatter
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
  • Loading branch information
susnux committed Jul 25, 2022
1 parent 4908c24 commit 849ec6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/nodes/FrontMatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ const FrontMatter = TiptapCodeBlock.extend({
},
]
},
renderHTML(node, attr) {
return ['div',
this.parent(node, attr),
['hr']]
},
toMarkdown: (state, node) => {
if (!state.out.match(/^\s*/)) throw Error('FrontMatter must be the first node of the document!')
state.write('')
Expand Down

0 comments on commit 849ec6f

Please sign in to comment.