yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

EOF is not treated like a line #465

Closed Andrew-Morozko closed 1 month ago

Andrew-Morozko commented 2 months ago

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.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.