Search code examples
ruby-on-railsrubydocumentation-generationannotateyard

How do I get `annotate_models` gem to work with yard in markdown?


How do I get annotate_models gem to work with yard in markdown?

At the moment, I specify --markup markdown in .yardopts and use the following in auto_annotate_models.rake:

'format_markdown'         => 'true'

However, the markdown renders very weirdly. Here's how the file looks like:

enter image description here


Solution

  • Annotate generates markdown compatible with kramdown, hence specifying --markup markdown --markup-provider kramdown in .yardopts fixes this.

    Here's the fixed render:

    enter image description here