diff options
| author | Nik Everett <nik9000@gmail.com> | 2019-11-28 23:46:05 -0500 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2019-11-28 21:46:05 -0700 |
| commit | f4eaf65195e19caf99cabf386bd52fd2e2307977 (patch) | |
| tree | 35418664d66fef47cb12b6f7ee030532119eb1b4 /lib | |
| parent | 4155916105b3276e5971349b1730b9d095d29db3 (diff) | |
resolves #3491 allow template to override outline (PR #3493)
Allows plugging a template in to the html5 converter's outline node by replacing all direct calls to `convert_outline` with calls to the to the conversion named `outline`.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/converter/html5.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/asciidoctor/converter/html5.rb b/lib/asciidoctor/converter/html5.rb index ae9402cf..6792d669 100644 --- a/lib/asciidoctor/converter/html5.rb +++ b/lib/asciidoctor/converter/html5.rb @@ -183,7 +183,7 @@ class Converter::Html5Converter < Converter::Base if sectioned && (node.attr? 'toc') && (node.attr? 'toc-placement', 'auto') result << %(<div id="toc" class="#{node.attr 'toc-class', 'toc'}"> <div id="toctitle">#{node.attr 'toc-title'}</div> -#{convert_outline node} +#{node.converter.convert node, 'outline'} </div>) end result << (generate_manname_section node) if node.attr? 'manpurpose' @@ -216,7 +216,7 @@ class Converter::Html5Converter < Converter::Base if sectioned && (node.attr? 'toc') && (node.attr? 'toc-placement', 'auto') result << %(<div id="toc" class="#{node.attr 'toc-class', 'toc'}"> <div id="toctitle">#{node.attr 'toc-title'}</div> -#{convert_outline node} +#{node.converter.convert node, 'outline'} </div>) end end @@ -318,7 +318,7 @@ MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () { if node.sections? && (node.attr? 'toc') && (toc_p = node.attr 'toc-placement') != 'macro' && toc_p != 'preamble' result << %(<div id="toc" class="toc"> <div id="toctitle">#{node.attr 'toc-title'}</div> -#{convert_outline node} +#{node.converter.convert node, 'outline'} </div>) end @@ -803,7 +803,7 @@ Your browser does not support the audio tag. toc = %( <div id="toc" class="#{doc.attr 'toc-class', 'toc'}"> <div id="toctitle">#{doc.attr 'toc-title'}</div> -#{convert_outline doc} +#{doc.converter.convert doc, 'outline'} </div>) else toc = '' @@ -941,7 +941,7 @@ Your browser does not support the audio tag. %(<div#{id_attr} class="#{role}"> <div#{title_id_attr} class="title">#{title}</div> -#{convert_outline doc, toclevels: levels} +#{doc.converter.convert doc, 'outline', toclevels: levels} </div>) end |
