goldmark
goldmark copied to clipboard
EOF is not treated like a line
Spec says:
A line is a sequence of zero or more characters other than line feed (U+000A) or carriage return (U+000D), followed by a line ending or by the end of file.
Goldmark doesn't treat the EOF as a new line, it's possible to see this in code blocks followed by the EOF:
- 4-space commonmark vs goldmark
- fenced commonmark vs goldmark
Simple workaround - append '\n'
if there is no trailing newline in the input, but I wonder if it may conflict with something else.