Skip to content

New constant for breaking changes in libcmark 0.29.0#19

Open
anthonyryan1 wants to merge 1 commit intokrakjoe:developfrom
anthonyryan1:develop
Open

New constant for breaking changes in libcmark 0.29.0#19
anthonyryan1 wants to merge 1 commit intokrakjoe:developfrom
anthonyryan1:develop

Conversation

@anthonyryan1
Copy link
Copy Markdown

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.

@coveralls
Copy link
Copy Markdown

coveralls commented Aug 8, 2019

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 Coverage Status
Change from base Build 243: -0.2%
Covered Lines: 1900
Relevant Lines: 1979

💛 - Coveralls

@dwo0
Copy link
Copy Markdown

dwo0 commented Aug 8, 2019

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?

@krakjoe
Copy link
Copy Markdown
Owner

krakjoe commented Aug 9, 2019

@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 ?

@remicollet
Copy link
Copy Markdown
Collaborator

Does raising minimal supported library version really make sense ?

@krakjoe
Copy link
Copy Markdown
Owner

krakjoe commented Aug 9, 2019

@remicollet I'm not sure actually, did any distros bump, what do you think ?

@remicollet
Copy link
Copy Markdown
Collaborator

@krakjoe
Copy link
Copy Markdown
Owner

krakjoe commented Aug 9, 2019

@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 ...

@anthonyryan1
Copy link
Copy Markdown
Author

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!

@dwo0
Copy link
Copy Markdown

dwo0 commented Aug 24, 2020

I like it.

@dwo0
Copy link
Copy Markdown

dwo0 commented Aug 24, 2020

@anthonyryan1, actually, you may have an error on line 154. CMARK_OPT_SMART should be CMARK_OPT_VALIDATE_UTF8.

Comment thread src/render.c Outdated
Also add the other missing options in case anyone wants to use them in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants