lumeland / lume

🔥 Static site generator for Deno 🦕
https://lume.land
MIT License
1.88k stars 86 forks source link

Extra spaces after the opening dashes of the frontmatter trigger the TOC plugin to interpret them as h2 #644

Closed ooker777 closed 1 month ago

ooker777 commented 2 months ago

I initialize a bare project with lume init, then create this simple markdown file. Notice there is a space after the first 3 dashes:

--- 
key: value
---
Body text

The result:

<!DOCTYPE html>
<hr>
<h2>key: value</h2>
<p>Body text</p>

If there isn't any space, then the result will be:

<!DOCTYPE html>
<p>Body text</p>
oscarotero commented 2 months ago

This bug is from Deno's std/front-matter package that returns the front matter as invalid due this space. I've created an issue: https://github.com/denoland/std/issues/5673

oscarotero commented 1 month ago

The bug has been fixed, I can close this.