Support both Commonmarker pre and post 1.0 #1601
Open
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.
Description
Hello! I maintain commonmarker, a Ruby gem for converting CommonMark markup into HTML.
Recently, @noraj opened an issue asking me about #1540. I don't know the entire history of the PR, but my understanding is that there are a few issues:
CommonMarker
const, which YARD uses, should not change, otherwise it's a breaking changeIn this PR, I am proposing that YARD just keep using whatever configuration values it accepts to configure commonmarker processing; at the time of processing, if the old
CommonMarker
const is available, it's implied that that version of commonmarker is being used, so YARD should call the method that version expects; otherwise, the newer version will be used.The one case this doesn't cover is this one:
Note that the current test suite passes, because unlike #1540 I passed the options necessary to make a 1:1 match to the old behavior. But: I don't know how to configure the tests or more specifically CI to load two versions of the gem—nor am I interested in learning how!
I think I've fulfilled my open source duties thus far. If I can help push this along in any way let me know. ✌️
Completed Tasks
bundle exec rake
locally (if code is attached to PR).