New constant for breaking changes in libcmark 0.29.0
Safe is now enabled by default and a no-op, which will probably come as a surprise to some people upgrading. People wanting the old default behavior will need to use the new Unsafe constant.
I'm not sure if we'll want to deprecate the Safe constant over a couple years or just leave it since it's a no-op.
Pull Request Test Coverage Report for Build 535
- 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.2%) to 96.008%
| Totals | |
|---|---|
| Change from base Build 243: | -0.2% |
| Covered Lines: | 1900 |
| Relevant Lines: | 1979 |
💛 - Coveralls
There are three other constants that have been added to libcmark besides Unsafe: CMARK_OPT_NORMALIZE, CMARK_OPT_VALIDATE_UTF8 and CMARK_OPT_SMART. Is there any value in including these constants as well?
@anthonyryan1 thanks ... I think we ought to treat constants the same as upstream, so a no-op is fine.
@dwo0 adding those seems reasonable, right ?
Does raising minimal supported library version really make sense ?
@remicollet I'm not sure actually, did any distros bump, what do you think ?
@krakjoe Fedora have 0.28.3 https://rpms.remirepo.net/rpmphp/zoom.php?rpm=cmark
@anthonyryan1 I think the only thing we can reasonably do here is register the constant for versions that support it, and carry the breaking change ... it's awkward, but < 1.0, so kinda expected ...
One year later.
I've updated this pull request based on the feedback above.
- I have added the other missing render options.
- Instead of bumping the library requirement, we're going to pass through the new constant if it's exposed (aka, built against libcmark 0.29.0)
Feedback welcome!
I like it.
@anthonyryan1, actually, you may have an error on line 154. CMARK_OPT_SMART should be CMARK_OPT_VALIDATE_UTF8.