-
Notifications
You must be signed in to change notification settings - Fork 19
invalid character in title produces dom error #876
Comments
Looks like we should fix GitHub slugger |
It's not the slugger. It's either a bug in the The following markdown reproduces the error locally: ---
Lorem ipsum: dolor
---
--- The text in the first section will be interpreted as frontmatter, and we will try to append <div data-lorem-ipsum="dolor"></div> This means that it's currently not possible in Helix to have section text containing I think it's incorrect to treat the above as frontmatter since there is an empty line after the |
what's wrong with this ?
but then it's broken. there are no empty lines allowed in frontmatter: helix-pipeline/src/html/remark-matter.js Line 148 in ef1502c
but for frontmatter at the beginning of the document, it's different: helix-pipeline/src/html/remark-matter.js Line 154 in ef1502c
we could require that all matter must not contain empty lines.... |
The expected output of that would be <div>Lorem ipsum: dolor</div>
👍
👍 |
I think forbidding empty lines in matter is too harsh, as you might want to use empty lines to structure your YAML. |
What about forbidding leading empty lines? So this ---
class: bla
foo: bar
--- would become YAML but ---
hey: you
--- would become HTML |
but it's already like this in mid-matter... |
We have a bit more leeway in being restrictive with midmatter because it is a Helix invention. For frontmatter, let's be as gradual in changing things as possible, i.e. only disallow leading empty lines. |
Description
eg: https://theblog--adobe.hlx.page/en/publish/2019/05/07/adobe-summit-emea-2019.html
probably caused here:
helix-pipeline/src/utils/heading-handler.js
Line 41 in 65e50a3
The text was updated successfully, but these errors were encountered: