-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify and fix handling of newline in code span.
Fixes #223 properly (one corner case has been unnoticed/hidden due test suite normalization feature). Fixes #230 (strictly speaking duplicate of the corner case).
- Loading branch information
Showing
2 changed files
with
4 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
aeddaf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be some funny pointer somewhere because I'm seeing weird and inconsistent results, for example:
See how the closing
code
tags are missing sometimes? Can you reproduce?Test subject:
aeddaf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ayyy, good catch. Cannot reproduce, but there's an uninitialized var now. Sadly, gcc warns only in release build about that.
Should be fixed in 5178c58.
aeddaf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've een 5178c58 but I don't have time to test it now. However, here's valgrind's report for aeddaf5. It actually reports a different line as the location of the uninitialized value.
aeddaf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be it. Valgrind does not report where that uninitialized variable should be initialized on the 1st place, it reports where it is to be used.
And yes the fix was about making sure all bits of
MD_MARK::flags
are initialized for the code span marks which is exactly what's evaluated on those lines reported by Valgrind.aeddaf5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was it. Later commit 5178c58 passed my test suite. Thanks.