Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set LIST_ITEM_END_OF_LIST when list is at end of document. (#305)
The LIST_ITEM_END_OF_LIST flag is an internal flag passed to renderers when rendering list items. It's normally set for the last item in the list. This change fixes the issue where that flag wasn't set in situations where the Markdown document ends with the list being the last block level item in it. The cases above detect and set LIST_ITEM_END_OF_LIST flag when the list ends because another thing begins, but they miss it when the end of document is reached. No tests here because this subtle internal behavior is hard to test and would require quite a bit of testing/mock infrastructure. Helps shurcooL/markdownfmt#30.
- Loading branch information