commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.62k stars 542 forks source link

<p> instead <H1> in first line (utf-8-BOM) #334

Closed ghost closed 4 years ago

ghost commented 4 years ago

If header 1 level (# Header) in first line, I get \<p> # Header\</p> instead \<H1>Header\</H1>.

jgm commented 4 years ago

Can't reproduce. Are you sure you have a space between # and H?

ghost commented 4 years ago

Hello, John. Yes, I do all right, according to specification. I compared different md-files and found (it seems to me) the cause of the issue. This is UTF-8-BOM. What is your opinion on whether utf-8-BOM should be supported?

jgm commented 4 years ago

Ah yes -- we should presumably skip a BOM marker at the beginning of input. That would be a worthwhile change.