How to customize marked to make it rendering <h2> tags and following elements in a <section>. If a new <h2> tag appears afterwards, wrap everything in a new <section> again.
exmpale markdown input:
# h1 header
## first h2 header
paragraph
paragraph
## second h2 header
paragraph
paragraph
html output:
<h1>h1 header</h1>
<section>
<h2>frist h2 header</h2>
<p>paragrqph</p>
<p>paragrqph</p>
</section>
<section>
<h2>second h2 header</h2>
<p>paragrqph</p>
<p>paragrqph</p>
</section>
Based on the answer from here. - added two line breaks after
sectionstart