Fix headline parsing leading to dropped lines.#34
Closed
calmofthestorm wants to merge 2 commits intoPoiScript:masterfrom
Closed
Fix headline parsing leading to dropped lines.#34calmofthestorm wants to merge 2 commits intoPoiScript:masterfrom
calmofthestorm wants to merge 2 commits intoPoiScript:masterfrom
Conversation
Currently, headline parsing breaks the file into lines before parsing headlines, stripping terminal \n or \r\n. This prevents parse_headline_level from differentiating between end of line and end of file. This can lead to an edge case where a line is considered a headline for the purposes of stopping parsing the body of the previous, yet not a headline itself. This leads to parsing stopping there. If the file is immediately written, this results in truncating it. One example of this is `"* \n*\r\n* \n"`, which will be parsed identically to `"* \n"`.
96eef01 to
4fe0958
Compare
Owner
|
thanks you for contributing, this problem has been fixed in v0.10. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, headline parsing breaks the file into lines before parsing
headlines, stripping terminal \n or \r\n. This prevents
parse_headline_level from differentiating between end of line and end of
file.
This can lead to an edge case where a line is considered a headline for
the purposes of stopping parsing the body of the previous, yet not a
headline itself. This leads to parsing stopping there.
If the file is immediately written, this results in truncating it.
One example of this is
"* \n*\r\n* \n", which will be parsedidentically to
"* \n".This should fix #26