Skip to content

Commit ed8b738

Browse files
committed
Some clean up of documentation for automatic header link feature.
1 parent affc3f1 commit ed8b738

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ Refer to the full [Pandoc Markdown] spec for useful extensions!
131131
To link to a header by its ID and have the header title automatically extracted
132132
as the link text, you may omit the link text like this: `[](#header-id)`.
133133

134-
For example, if your source code has a header like `# Algorithm Return Type # {#return-type}`,
134+
For example, if your source code has a header like `# Algorithm Return Type {#return-type}`,
135135
you can reference it using `[](#return-type)`. The rendered document will automatically display
136-
'Algorithm Return Type' as the link text.
136+
"Algorithm Return Type" as the link text.
137137

138138
```markdown
139139
- Except as mentioned above, the parallel range algorithms should return

TEST.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ match parse(some_input) {
199199
}
200200
```
201201

202+
## Automatic Header Links {#auto-header-links}
203+
204+
Automatic header links are written as `[](#auto-header-links)`{.markdown},
205+
and renders as [](#auto-header-links).
206+
202207
# Comparison Tables
203208

204209
::: cmptable
@@ -397,8 +402,3 @@ Anything in <https://wg21.link/index.yaml> are linked automatically.
397402
- LWG Issues (e.g., `[@LWG1234]` [@LWG1234])
398403
- Github Edits (e.g, `[@EDIT1234]` [@EDIT1234])
399404
- Standing Documents (e.g., `[@SD6]` [@SD6])
400-
401-
# Automatic Header Links # {#auto-header-links}
402-
403-
Automatic header links are written as `[](#auto-header-links)`{.markdown},
404-
and renders as [](#auto-header-links).

generated/TEST.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="generator" content="mpark/wg21" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7-
<meta name="dcterms.date" content="2025-01-09" />
7+
<meta name="dcterms.date" content="2025-01-10" />
88
<title>Test document for mpark/wg21</title>
99
<style>
1010
code{white-space: pre-wrap;}
@@ -434,7 +434,7 @@ <h3 class="subtitle" style="text-align:center">Visual inspection of
434434
</tr>
435435
<tr>
436436
<td>Date:</td>
437-
<td>2025-01-09</td>
437+
<td>2025-01-10</td>
438438
</tr>
439439
<tr>
440440
<td style="vertical-align:top">Project:</td>
@@ -474,6 +474,8 @@ <h1 id="toctitle">Contents</h1>
474474
<code class="sourceCode cpp"><span class="dt">int</span></code>,
475475
<code class="sourceCode cpp">x <span class="op">&amp;</span> y</code><span></span></a></li>
476476
<li><a href="#code-block" id="toc-code-block"><span class="toc-section-number">3.3</span> Code Block<span></span></a></li>
477+
<li><a href="#auto-header-links" id="toc-auto-header-links"><span class="toc-section-number">3.4</span> Automatic Header
478+
Links<span></span></a></li>
477479
</ul></li>
478480
<li><a href="#comparison-tables" id="toc-comparison-tables"><span class="toc-section-number">4</span> Comparison
479481
Tables<span></span></a></li>
@@ -489,9 +491,7 @@ <h1 id="toctitle">Contents</h1>
489491
<li><a href="#stable-names" id="toc-stable-names"><span class="toc-section-number">6</span> Stable Names<span></span></a></li>
490492
<li><a href="#notes" id="toc-notes"><span class="toc-section-number">7</span> Notes<span></span></a></li>
491493
<li><a href="#citation" id="toc-citation"><span class="toc-section-number">8</span> Citation<span></span></a></li>
492-
<li><a href="#auto-header-links" id="toc-auto-header-links"><span class="toc-section-number">9</span> Automatic Header
493-
Links<span></span></a></li>
494-
<li><a href="#bibliography" id="toc-bibliography"><span class="toc-section-number">10</span> References<span></span></a></li>
494+
<li><a href="#bibliography" id="toc-bibliography"><span class="toc-section-number">9</span> References<span></span></a></li>
495495
</ul>
496496
</div>
497497
<h1 data-number="1" id="introduction"><span class="header-section-number">1</span> Introduction<a href="#introduction" class="self-link"></a></h1>
@@ -663,6 +663,9 @@ <h3 data-number="3.3.4" id="rust-syntax-highlighting"><span class="header-sectio
663663
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> <span class="cn">Ok</span>(v) <span class="op">=&gt;</span> <span class="co">// use `v`</span></span>
664664
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a> <span class="cn">Err</span>(err) <span class="op">=&gt;</span> <span class="co">// use `err`</span></span>
665665
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
666+
<h2 data-number="3.4" id="auto-header-links"><span class="header-section-number">3.4</span> Automatic Header Links<a href="#auto-header-links" class="self-link"></a></h2>
667+
<p>Automatic header links are written as <code class="sourceCode markdown">[](#auto-header-links)</code>, and renders
668+
as <a href="#auto-header-links">Automatic Header Links</a>.</p>
666669
<h1 data-number="4" id="comparison-tables"><span class="header-section-number">4</span> Comparison Tables<a href="#comparison-tables" class="self-link"></a></h1>
667670
<table>
668671
<caption><blockquote>
@@ -946,10 +949,7 @@ <h1 data-number="8" id="citation"><span class="header-section-number">8</span> C
946949
<li>Standing Documents (e.g., <code class="sourceCode cpp"><span class="op">[@</span>SD6<span class="op">]</span></code>
947950
<span class="citation" data-cites="SD6">[<a href="https://wg21.link/sd6" role="doc-biblioref">SD6</a>]</span>)</li>
948951
</ul>
949-
<h1 data-number="9" id="auto-header-links"><span class="header-section-number">9</span> Automatic Header Links<a href="#auto-header-links" class="self-link"></a></h1>
950-
<p>Automatic header links are written as <code class="sourceCode markdown">[](#auto-header-links)</code>, and renders
951-
as <a href="#auto-header-links">Automatic Header Links</a>.</p>
952-
<h1 data-number="10" id="bibliography"><span class="header-section-number">10</span> References<a href="#bibliography" class="self-link"></a></h1>
952+
<h1 data-number="9" id="bibliography"><span class="header-section-number">9</span> References<a href="#bibliography" class="self-link"></a></h1>
953953
<div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="1" role="doc-bibliography">
954954
<div id="ref-CWG1234" class="csl-entry" role="doc-biblioentry">
955955
[CWG1234] Johannes Schaub. 2011-01-18. abstract-declarator does not

img/automatic-header-link.png

2.18 KB
Loading

0 commit comments

Comments
 (0)