jfoucher/Jimmy

Byte Order Mark causes first line to be displayed incorrectly

Closed this issue · 0 comments

A Byte order mark in a UTF-8 text file causes Jimmy to not properly parse the first line of a gemtext file, and renders it as a normal line of text. Here is a screen shot of the latest version of Jimmy not rendering the first line as a Header, because the file starts with a BOM:

image

Here is the test page:
gemini://gemi.dev/tests/bom.gmi

I suspect that the line parsing logic looks at the first character of a line to determine its type. Because the first character is a BOM and not a # the line is not properly parsed. BOMs should be ignored by Jimmy