yard icon indicating copy to clipboard operation
yard copied to clipboard

Commonmarker 1.0 support

Open haines opened this issue 1 year ago • 2 comments

Commonmarker 1.0 changes the top-level constant name from CommonMarker to Commonmarker, so YARD fails to detect the provider.

https://github.com/lsegal/yard/blob/2d197a381c5d4cc5c55b2c60fff992b31c986361/lib/yard/templates/helpers/markup_helper.rb#L33

https://github.com/gjtorikian/commonmarker/issues/269

The method used to render markdown is now Commonmarker.to_html rather than CommonMarker.render_html. It takes a hash of options instead of the previous arrays of symbols.

https://github.com/lsegal/yard/blob/2d197a381c5d4cc5c55b2c60fff992b31c986361/lib/yard/templates/helpers/html_helper.rb#L93

haines avatar Jan 12 '24 14:01 haines

For those who can’t wait for the maintainer to read my PR, you can use this in your Gemfile:

gem 'yard', github: 'ParadoxV5/yard', tag: 'commonmarker-1.0_1'

or, to use the branch’s bleeding edge that the PR may revise:

gem 'yard', github: 'ParadoxV5/yard', branch: 'commonmarker-1.0'

ParadoxV5 avatar Mar 23 '24 18:03 ParadoxV5

Now there is commonmarker 2.x.x too: https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md#v200---25-11-2024

noraj avatar Jan 25 '25 22:01 noraj