lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.92k stars 394 forks source link

Commonmarker 1.0 support #1528

Open haines opened 5 months ago

haines commented 5 months ago

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

ParadoxV5 commented 3 months ago

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'