diff --git a/.gitignore b/.gitignore index e55f2c5f06..f66716bd6f 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,5 @@ htmldocs ## these are not needed anymore unless checkout old older versions nimdoc.out.css +# except here: +!/nimdoc/testproject/expected/* diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg index ff4dac7811..5e0ea55ac1 100644 --- a/config/nimdoc.cfg +++ b/config/nimdoc.cfg @@ -34,7 +34,8 @@ doc.section.toc2 = """ # Available variables are: # * $desc: the actual docstring of the item. # * $header: the full version of name, including types, pragmas, tags, etc. -# * $header_plain: like header but without HTML, for attribute embedding. +# * $header_plain: like header but without HTML (and without pragmas, tags, etc.), +# for attribute embedding. # * $itemID: numerical unique entry of the item in the HTML. # * $itemSym: short symbolic name of the item for easier hyperlinking. # * $itemSymEnc: quoted version for URLs or attributes. @@ -55,6 +56,9 @@ $seeSrc # Chunk of HTML emitted for each entry in the HTML table of contents. # See doc.item for available substitution variables. + +# This is used for TOC items which are not overloadable (e.g. types). +# `$header_plain` would be too verbose here, so we use $name. doc.item.toc = """
  • $name
  • @@ -63,7 +67,7 @@ doc.item.toc = """ # This is used for TOC items which are grouped by the same name (e.g. procs). doc.item.tocTable = """
  • $itemSymOrID
  • + title="$header_plain">$header_plain """ diff --git a/nimdoc/test_out_index_dot_html/expected/index.html b/nimdoc/test_out_index_dot_html/expected/index.html index 35a5dfb56d..4646732f1f 100644 --- a/nimdoc/test_out_index_dot_html/expected/index.html +++ b/nimdoc/test_out_index_dot_html/expected/index.html @@ -98,7 +98,7 @@ window.addEventListener('DOMContentLoaded', main);