A lineis 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:
Spec says:
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.