jfoucher / Jimmy

Gemini client for MacOs
MIT License
53 stars 3 forks source link

Byte Order Mark causes first line to be displayed incorrectly #21

Closed acidus99 closed 10 months ago

acidus99 commented 1 year ago

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