rdoc
rdoc copied to clipboard
Skipping heading ranks
With Asciidoc, it is recommended to keep headings in order. That is to say, H4 should not follow H2, better for H3 to follow H2. If you break this it gives a warning:
asciidoctor: WARNING: readme.adoc: line 11: section title out of sequence:
expected level 2, got level 3
i was somewhat surprised by this, but then i noticed this is an official recommendation as well:
- https://developer.mozilla.org/Web/HTML/Element/Heading_Elements#Usage_notes
- https://w3.org/WAI/tutorials/page-structure/headings
RDoc has no restriction on header order and in fact doesnt even advise against out of order headings:
https://ruby.github.io/rdoc/RDoc/Markup#class-RDoc::Markup-label-Headers