- sect0 = section_level == 0 | |
= html_tag_if !sect0, :section, class: [%(sect#{section_level}), role] | |
*{tag: %(h#{section_level + 1}), id: id, class: ('sect0' if sect0)} | |
- if id | |
- if document.attr? :sectanchors | |
a.anchor href="##{id}" aria-hidden='true' | |
- if document.attr? :sectlinks | |
a.link href="##{id}" =section_title | |
- else | |
=section_title | |
- else | |
=section_title | |
=content |