goldmark icon indicating copy to clipboard operation
goldmark copied to clipboard

EOF is not treated like a line

Open Andrew-Morozko opened this issue 6 months ago • 0 comments

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:

Simple workaround - append '\n' if there is no trailing newline in the input, but I wonder if it may conflict with something else.

Andrew-Morozko avatar Aug 20 '24 18:08 Andrew-Morozko