front-matter icon indicating copy to clipboard operation
front-matter copied to clipboard

bodyBegin behaves unexpectedly

Open irasanchez opened this issue 9 months ago • 0 comments

Hey there, I am using this to find the space between the front matter and markdown content so that I can insert an image after the front matter and before everything else.

The bodyBegin attribute seemed to be exactly what I was looking for, but it doesn't behave like I thought it would.

In documents with front matter and a heading (h1, h2, etc.), the bodyBegin line is the line after the heading. I thought that was an intentional choice until I tried without a heading. The bodyBegin line is then the line after the first paragraph of content.

For now, I am just subtracting the amount needed each time (1 or 2 lines). Is this how it's intended to be used though?

This attribute is really useful and hard to find in similar libraries. Yours was the only one I could find. Any help is much appreciated, thanks!

irasanchez avatar Sep 25 '23 17:09 irasanchez