Open postmodern opened 3 years ago
Er, it looks like custom parser wrapper code is defined as classes in YARD::Templates::Helpers::Markup::
. Maybe I'll try writing a wrapper class for calling Kramdown::Document.new
.
I wrote a simple class that inherits from Kramdown::Document
and is input: 'GFM'
aware, but it seems to break the auto-detection of Kramdown. Will need some guidance about the best way to do this.
https://github.com/postmodern/yard/commit/7a91cff36b4eff3d4b5bc9a9c57c840afcebbac1
It would be nice if YARD::Templates::Helpers::MarkupHelpers also supported kramdown-parser-gfm which adds GitHub Flavored Markdown support to Kramdown. This could be done by changing
MARKUP_PROVIDERS
to contain a lambda that InitializesKramdown::Docuement
but checks ifdefined?(Kramdown::Parser::GFM)
and runsKramdown::Document.new(text, input: 'GFM')
instead of the regularKramdown::Document.new(text)
. I would be willing to try implementing this, but would require modifyingload_markup_provider
and not sure how you'd prefer I go about this?