aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-07-16 17:08:15 +0700
committerShulhan <ms@kilabit.info>2022-07-16 17:08:15 +0700
commitde0936dc0100b5f45426e4dace5e836f41d0906e (patch)
tree53c9ecf0d427bccf0d6aa87827b2502b849630ec
parent3172c7731a4a2feea6ddcb4293a66dc0eab01dda (diff)
downloadasciidoctor-go-de0936dc0100b5f45426e4dace5e836f41d0906e.tar.xz
all: refactoring handling generate ref ID
Previously, we always set the ID prefix and separator default to "_" if its not set, this cause all of the ID is prefixed with "_". This changes use strict rules when generating ID following the Mozilla specification [1] and latest AsciiDoc Language [2]. The idprefix must be ASCII string. It must start with "_", "-", or ASCII letters, otherwise the "_" will be added to the beginning. If one of the character is not valid, it will replaced with "_". The `idseparator` can be empty or single ASCII character ('_' or '-', ASCII letter, or digit). It is used to replace invalid characters in the REF_ID. [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id [2] https://docs.asciidoctor.org/asciidoc/latest/sections/id-prefix-and-separator/
-rw-r--r--SPECS.adoc26
-rw-r--r--parser.go88
-rw-r--r--parser_test.go78
-rw-r--r--testdata/got.test.html278
4 files changed, 307 insertions, 163 deletions
diff --git a/SPECS.adoc b/SPECS.adoc
index 2dd12d0..71e78a4 100644
--- a/SPECS.adoc
+++ b/SPECS.adoc
@@ -47,6 +47,8 @@ This implementation,
== Common grammar
----
+EMPTY = ""
+
DQUOTE = %d34 ; "
WORD = 1*VCHAR ; Sequence of visible character without
@@ -226,6 +228,30 @@ number of '=' minus 1.
</div>
----
+=== Section Attributes
+
+==== idprefix
+
+----
+":idprefix:" EMPTY / REF_ID
+----
+
+The idprefix must be ASCII string.
+It must start with "\_", "\-", or ASCII letters, otherwise the "\_" will be
+prepended.
+If one of the character is not valid, it will replaced with "\_".
+
+==== idseparator
+
+----
+":idseparator:" EMPTY / "-" / "_" / ALPHA
+----
+
+The `idseparator` can be empty or single ASCII character ("\_" or "\-",
+ASCII letter, or digit).
+It is used to replace invalid REF_ID character.
+
+
== Comments
----
diff --git a/parser.go b/parser.go
index 5dea254..3ab28e8 100644
--- a/parser.go
+++ b/parser.go
@@ -6,7 +6,6 @@ package asciidoctor
import (
"bytes"
"strings"
- "unicode"
"github.com/shuLhan/share/lib/ascii"
)
@@ -390,38 +389,77 @@ func applySubstitutions(doc *Document, content []byte) []byte {
return buf.Bytes()
}
+// generateID generate ID for anchor.
+// This function follow the [Mozilla specification].
+//
+// The generated ID is affected by the following metadata: `idprefix` and
+// `idseparator`.
+//
+// The idprefix must be ASCII string.
+// It must start with '_', '-', or ASCII letters, otherwise the '_' will be
+// prepended.
+// If one of the character is not valid, it will replaced with '_'.
+//
+// The `idseparator` can be empty or single ASCII character ('_' or '-',
+// ASCII letter, or digit).
+// It is used to replace invalid characters in the src.
+//
+// [Mozilla specification]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id.
func generateID(doc *Document, str string) string {
var (
- idPrefix = "_"
- idSep = "_"
- id = make([]rune, 0, len(str)+1)
+ idSep byte = '_'
- v string
- c rune
- ok bool
+ v string
+ bout []byte
+ c byte
+ ok bool
)
v, ok = doc.Attributes[metaNameIDPrefix]
if ok {
- idPrefix = strings.TrimSpace(v)
+ v = strings.TrimSpace(v)
+ if len(v) > 0 {
+ str = v + str
+ }
}
+ bout = make([]byte, 0, len(str))
+
v, ok = doc.Attributes[metaNameIDSeparator]
if ok {
- idSep = strings.TrimSpace(v)
+ v = strings.TrimSpace(v)
+ if len(v) == 0 {
+ // idseparator metadata exist and set to empty.
+ idSep = 0
+ } else {
+ c = v[0]
+ if c == '_' || c == '-' || ascii.IsAlnum(c) {
+ idSep = c
+ }
+ }
}
- id = append(id, []rune(idPrefix)...)
- for _, c = range strings.ToLower(str) {
- if unicode.IsLetter(c) || unicode.IsDigit(c) {
- id = append(id, c)
- } else {
- if id[len(id)-1] != '_' {
- id = append(id, []rune(idSep)...)
+ for _, c = range []byte(str) {
+ if c == '_' || c == '-' || ascii.IsAlnum(c) {
+ if c >= 'A' && c <= 'Z' {
+ bout = append(bout, c+32)
+ } else {
+ bout = append(bout, c)
}
+ } else if idSep != 0 {
+ bout = append(bout, idSep)
}
}
- return strings.TrimRight(string(id), idSep)
+
+ if len(bout) == 0 {
+ bout = append(bout, '_')
+ } else if !ascii.IsAlpha(bout[0]) && bout[0] != '_' {
+ bout = append(bout, '_')
+ copy(bout[1:], bout[:])
+ bout[0] = '_'
+ }
+
+ return string(bout)
}
func isAdmonition(line []byte) bool {
@@ -492,23 +530,25 @@ func isTitle(line []byte) bool {
return false
}
-// isValidID will return true if id is valid XML ID, where the first character
-// is '-', '_', or letter; and the rest is either '-', '_', letter or digits.
+// isValidID will return true if id is valid HTML ref ID according to
+// [Mozilla specification], where the first character is either '-', '_', or
+// ASCII letter, and the rest is either '-', '_', ASCII letter or digit.
+//
+// [Mozilla specification]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id.
func isValidID(id []byte) bool {
var (
x int
- r rune
+ c byte
)
- for x, r = range string(id) {
+ for x, c = range id {
if x == 0 {
- if !(r == ':' || r == '-' || r == '_' || unicode.IsLetter(r)) {
+ if !(c == '-' || c == '_' || ascii.IsAlpha(c)) {
return false
}
continue
}
- if r == ':' || r == '-' || r == '_' || r == '.' ||
- unicode.IsLetter(r) || unicode.IsDigit(r) {
+ if c == '-' || c == '_' || c == '.' || ascii.IsAlnum(c) {
continue
}
return false
diff --git a/parser_test.go b/parser_test.go
index 94225c5..d443530 100644
--- a/parser_test.go
+++ b/parser_test.go
@@ -9,6 +9,84 @@ import (
"github.com/shuLhan/share/lib/test"
)
+func TestGenerateID(t *testing.T) {
+ type testCase struct {
+ inputExp map[string]string
+ doc *Document
+ desc string
+ }
+
+ var cases = []testCase{{
+ desc: `Without idprefix and idseparator`,
+ doc: &Document{
+ Attributes: AttributeEntry{},
+ },
+ inputExp: map[string]string{
+ `a b c`: `a_b_c`,
+ ` a b c`: `_a_b_c`,
+ },
+ }, {
+ desc: `With idprefix`,
+ doc: &Document{
+ Attributes: AttributeEntry{
+ metaNameIDPrefix: `123`,
+ },
+ },
+ inputExp: map[string]string{
+ `a b c`: `_123a_b_c`,
+ ` a b c`: `_123_a_b_c`,
+ },
+ }, {
+ desc: `With empty idseparator`,
+ doc: &Document{
+ Attributes: AttributeEntry{
+ metaNameIDSeparator: ``,
+ },
+ },
+ inputExp: map[string]string{
+ `a b c`: `abc`,
+ ` a b c`: `abc`,
+ },
+ }, {
+ desc: `With idseparator`,
+ doc: &Document{
+ Attributes: AttributeEntry{
+ metaNameIDSeparator: `-`,
+ },
+ },
+ inputExp: map[string]string{
+ `a b c`: `a-b-c`,
+ ` a b c`: `_-a-b-c`,
+ },
+ }, {
+ desc: `With idprefix and idseparator`,
+ doc: &Document{
+ Attributes: AttributeEntry{
+ metaNameIDPrefix: `id_`,
+ metaNameIDSeparator: `-`,
+ },
+ },
+ inputExp: map[string]string{
+ `a b c`: `id_a-b-c`,
+ ` a b c`: `id_-a-b-c`,
+ },
+ }}
+
+ var (
+ c testCase
+ inp string
+ exp string
+ got string
+ )
+
+ for _, c = range cases {
+ for inp, exp = range c.inputExp {
+ got = generateID(c.doc, inp)
+ test.Assert(t, c.desc, exp, got)
+ }
+ }
+}
+
func TestIsValidID(t *testing.T) {
type testCase struct {
id string
diff --git a/testdata/got.test.html b/testdata/got.test.html
index 704ee70..952f7fa 100644
--- a/testdata/got.test.html
+++ b/testdata/got.test.html
@@ -28,115 +28,115 @@
<div id="toc" class="toc">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
-<li><a href="#_metadata_references">1. Metadata references</a></li>
-<li><a href="#_inline_formatting_on_section">2. <em>Inline <code>formatting</code> on <strong>section</strong></em></a></li>
-<li><a href="#_level_1">3. Level 1</a>
+<li><a href="#metadata_references">1. Metadata references</a></li>
+<li><a href="#inline_formatting_on_section">2. <em>Inline <code>formatting</code> on <strong>section</strong></em></a></li>
+<li><a href="#level_1">3. Level 1</a>
<ul class="sectlevel2">
-<li><a href="#_level_2">3.1. Level 2</a>
+<li><a href="#level_2">3.1. Level 2</a>
<ul class="sectlevel3">
-<li><a href="#_level_3">3.1.1. Level 3</a></li>
+<li><a href="#level_3">3.1.1. Level 3</a></li>
</ul>
</li>
</ul>
</li>
-<li><a href="#_section_two">Section Two</a></li>
-<li><a href="#_section_three">4. Section Three</a></li>
-<li><a href="#_comment">5. Comment</a></li>
-<li><a href="#_paragraph">6. Paragraph</a>
+<li><a href="#section_two">Section Two</a></li>
+<li><a href="#section_three">4. Section Three</a></li>
+<li><a href="#comment">5. Comment</a></li>
+<li><a href="#paragraph">6. Paragraph</a>
<ul class="sectlevel2">
-<li><a href="#_alignment">6.1. Alignment</a></li>
-<li><a href="#_line_break">6.2. Line break</a></li>
+<li><a href="#alignment">6.1. Alignment</a></li>
+<li><a href="#line_break">6.2. Line break</a></li>
</ul>
</li>
-<li><a href="#_unconstrained_text_formatting">7. Unconstrained text formatting</a></li>
-<li><a href="#_single_quote">8. Single quote</a></li>
-<li><a href="#_subscript_and_superscript">9. Subscript and superscript</a></li>
-<li><a href="#_constrained_text_formatting">10. Constrained text formatting</a></li>
-<li><a href="#_blocks">11. Blocks</a>
+<li><a href="#unconstrained_text_formatting">7. Unconstrained text formatting</a></li>
+<li><a href="#single_quote">8. Single quote</a></li>
+<li><a href="#subscript_and_superscript">9. Subscript and superscript</a></li>
+<li><a href="#constrained_text_formatting">10. Constrained text formatting</a></li>
+<li><a href="#blocks">11. Blocks</a>
<ul class="sectlevel2">
-<li><a href="#_title">11.1. Title</a></li>
+<li><a href="#title">11.1. Title</a></li>
</ul>
</li>
-<li><a href="#_block_listing">12. Block listing</a></li>
-<li><a href="#_block_literal">13. Block literal</a></li>
-<li><a href="#_ordered_lists">14. Ordered Lists</a></li>
-<li><a href="#_unordered_lists">15. Unordered Lists</a>
+<li><a href="#block_listing">12. Block listing</a></li>
+<li><a href="#block_literal">13. Block literal</a></li>
+<li><a href="#ordered_lists">14. Ordered Lists</a></li>
+<li><a href="#unordered_lists">15. Unordered Lists</a>
<ul class="sectlevel2">
-<li><a href="#_custom_markers">15.1. Custom markers</a></li>
-<li><a href="#_checklist">15.2. Checklist</a></li>
+<li><a href="#custom_markers">15.1. Custom markers</a></li>
+<li><a href="#checklist">15.2. Checklist</a></li>
</ul>
</li>
-<li><a href="#_mixed_list">16. Mixed list</a></li>
-<li><a href="#_description_list">17. Description list</a></li>
-<li><a href="#_question_and_answers">18. Question and Answers</a></li>
-<li><a href="#_table">19. Table</a>
+<li><a href="#mixed_list">16. Mixed list</a></li>
+<li><a href="#description_list">17. Description list</a></li>
+<li><a href="#question_and_answers">18. Question and Answers</a></li>
+<li><a href="#table">19. Table</a>
<ul class="sectlevel2">
-<li><a href="#_column_formatting">19.1. Column Formatting</a></li>
-<li><a href="#_cell_formatting">19.2. Cell formatting</a></li>
-<li><a href="#_header_row">19.3. Header row</a></li>
-<li><a href="#_footer_row">19.4. Footer row</a></li>
-<li><a href="#_table_width">19.5. Table width</a></li>
-<li><a href="#_table_borders">19.6. Table borders</a>
+<li><a href="#column_formatting">19.1. Column Formatting</a></li>
+<li><a href="#cell_formatting">19.2. Cell formatting</a></li>
+<li><a href="#header_row">19.3. Header row</a></li>
+<li><a href="#footer_row">19.4. Footer row</a></li>
+<li><a href="#table_width">19.5. Table width</a></li>
+<li><a href="#table_borders">19.6. Table borders</a>
<ul class="sectlevel3">
-<li><a href="#_frame">19.6.1. Frame</a></li>
-<li><a href="#_grids">19.6.2. Grids</a></li>
+<li><a href="#frame">19.6.1. Frame</a></li>
+<li><a href="#grids">19.6.2. Grids</a></li>
</ul>
</li>
-<li><a href="#_striping">19.7. Striping</a></li>
-<li><a href="#_orientation">19.8. Orientation</a></li>
-<li><a href="#_table_caption">19.9. Table caption</a></li>
-<li><a href="#_escaping_the_cell_separator">19.10. Escaping the Cell separator</a></li>
+<li><a href="#striping">19.7. Striping</a></li>
+<li><a href="#orientation">19.8. Orientation</a></li>
+<li><a href="#table_caption">19.9. Table caption</a></li>
+<li><a href="#escaping_the_cell_separator">19.10. Escaping the Cell separator</a></li>
</ul>
</li>
-<li><a href="#_horizontal_rules">20. Horizontal rules</a></li>
-<li><a href="#_page_break">21. Page break</a></li>
-<li><a href="#_urls">22. URLs</a></li>
-<li><a href="#_anchors">23. Anchors</a>
+<li><a href="#horizontal_rules">20. Horizontal rules</a></li>
+<li><a href="#page_break">21. Page break</a></li>
+<li><a href="#urls">22. URLs</a></li>
+<li><a href="#anchors">23. Anchors</a>
<ul class="sectlevel2">
<li><a href="#version-4_9">23.1. Version 4.9</a></li>
<li><a href="#version-4_10">23.2. Version 4.10</a></li>
<li><a href="#which-one">23.3. Version 4.11</a></li>
</ul>
</li>
-<li><a href="#_cross_references">24. Cross references</a>
+<li><a href="#cross_references">24. Cross references</a>
<ul class="sectlevel2">
-<li><a href="#_internal">24.1. Internal</a></li>
+<li><a href="#internal">24.1. Internal</a></li>
</ul>
</li>
-<li><a href="#_include">25. Include</a></li>
-<li><a href="#_images">26. Images</a>
+<li><a href="#include">25. Include</a></li>
+<li><a href="#images">26. Images</a>
<ul class="sectlevel2">
-<li><a href="#_block_images">26.1. Block images</a></li>
-<li><a href="#_float_group">26.2. Float group</a></li>
-<li><a href="#_inline_image">26.3. Inline image</a></li>
+<li><a href="#block_images">26.1. Block images</a></li>
+<li><a href="#float_group">26.2. Float group</a></li>
+<li><a href="#inline_image">26.3. Inline image</a></li>
</ul>
</li>
-<li><a href="#_block_open">27. Block open</a></li>
-<li><a href="#_video">28. Video</a></li>
-<li><a href="#_audio">29. Audio</a></li>
-<li><a href="#_admonition">30. Admonition</a>
+<li><a href="#block_open">27. Block open</a></li>
+<li><a href="#video">28. Video</a></li>
+<li><a href="#audio">29. Audio</a></li>
+<li><a href="#admonition">30. Admonition</a>
<ul class="sectlevel2">
-<li><a href="#_line_admonition">30.1. Line admonition</a></li>
-<li><a href="#_style_admonition">30.2. Style admonition</a></li>
-<li><a href="#_icons">30.3. Icons</a></li>
+<li><a href="#line_admonition">30.1. Line admonition</a></li>
+<li><a href="#style_admonition">30.2. Style admonition</a></li>
+<li><a href="#icons">30.3. Icons</a></li>
</ul>
</li>
-<li><a href="#_sidebar">31. Sidebar</a></li>
-<li><a href="#_example">32. Example</a></li>
-<li><a href="#_quote">33. Quote</a>
+<li><a href="#sidebar">31. Sidebar</a></li>
+<li><a href="#example">32. Example</a></li>
+<li><a href="#quote">33. Quote</a>
<ul class="sectlevel2">
-<li><a href="#_quoted_paragraph">33.1. Quoted paragraph</a></li>
+<li><a href="#quoted_paragraph">33.1. Quoted paragraph</a></li>
</ul>
</li>
-<li><a href="#_verse">34. Verse</a></li>
-<li><a href="#_passthrough">35. Passthrough</a>
+<li><a href="#verse">34. Verse</a></li>
+<li><a href="#passthrough">35. Passthrough</a>
<ul class="sectlevel2">
-<li><a href="#_block_passthrough">35.1. Block passthrough</a></li>
+<li><a href="#block_passthrough">35.1. Block passthrough</a></li>
</ul>
</li>
-<li><a href="#_section_discrete">36. Section Discrete</a>
+<li><a href="#section_discrete">36. Section Discrete</a>
<ul class="sectlevel2">
-<li><a href="#_after_discrete">36.1. After discrete</a></li>
+<li><a href="#after_discrete">36.1. After discrete</a></li>
</ul>
</li>
</ul>
@@ -171,7 +171,7 @@
</div>
</div>
<div class="sect1">
-<h2 id="_metadata_references"><a class="anchor" href="#_metadata_references"></a><a class="link" href="#_metadata_references">1. Metadata references</a></h2>
+<h2 id="metadata_references"><a class="anchor" href="#metadata_references"></a><a class="link" href="#metadata_references">1. Metadata references</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>First author: Author A Author A <a href="mailto:a@a.com">a@a.com</a>
@@ -191,7 +191,7 @@ AA.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_inline_formatting_on_section"><a class="anchor" href="#_inline_formatting_on_section"></a><a class="link" href="#_inline_formatting_on_section">2. <em>Inline <code>formatting</code> on <strong>section</strong></em></a></h2>
+<h2 id="inline_formatting_on_section"><a class="anchor" href="#inline_formatting_on_section"></a><a class="link" href="#inline_formatting_on_section">2. <em>Inline <code>formatting</code> on <strong>section</strong></em></a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Test inline formatting on section title.</p>
@@ -199,16 +199,16 @@ AA.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_level_1"><a class="anchor" href="#_level_1"></a><a class="link" href="#_level_1">3. Level 1</a></h2>
+<h2 id="level_1"><a class="anchor" href="#level_1"></a><a class="link" href="#level_1">3. Level 1</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_level_2"><a class="anchor" href="#_level_2"></a><a class="link" href="#_level_2">3.1. Level 2</a></h3>
+<h3 id="level_2"><a class="anchor" href="#level_2"></a><a class="link" href="#level_2">3.1. Level 2</a></h3>
<div class="sect3">
-<h4 id="_level_3"><a class="anchor" href="#_level_3"></a><a class="link" href="#_level_3">3.1.1. Level 3</a></h4>
+<h4 id="level_3"><a class="anchor" href="#level_3"></a><a class="link" href="#level_3">3.1.1. Level 3</a></h4>
<div class="sect4">
-<h5 id="_level_4"><a class="anchor" href="#_level_4"></a><a class="link" href="#_level_4">Level 4</a></h5>
+<h5 id="level_4"><a class="anchor" href="#level_4"></a><a class="link" href="#level_4">Level 4</a></h5>
<div class="sect5">
-<h6 id="_level_5"><a class="anchor" href="#_level_5"></a><a class="link" href="#_level_5">Level 5</a></h6>
+<h6 id="level_5"><a class="anchor" href="#level_5"></a><a class="link" href="#level_5">Level 5</a></h6>
</div>
</div>
</div>
@@ -216,17 +216,17 @@ AA.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_section_two"><a class="anchor" href="#_section_two"></a><a class="link" href="#_section_two">Section Two</a></h2>
+<h2 id="section_two"><a class="anchor" href="#section_two"></a><a class="link" href="#section_two">Section Two</a></h2>
<div class="sectionbody">
</div>
</div>
<div class="sect1">
-<h2 id="_section_three"><a class="anchor" href="#_section_three"></a><a class="link" href="#_section_three">4. Section Three</a></h2>
+<h2 id="section_three"><a class="anchor" href="#section_three"></a><a class="link" href="#section_three">4. Section Three</a></h2>
<div class="sectionbody">
</div>
</div>
<div class="sect1">
-<h2 id="_comment"><a class="anchor" href="#_comment"></a><a class="link" href="#_comment">5. Comment</a></h2>
+<h2 id="comment"><a class="anchor" href="#comment"></a><a class="link" href="#comment">5. Comment</a></h2>
<div class="sectionbody">
<div class="literalblock">
<div class="content">
@@ -238,7 +238,7 @@ Indented block comment
</div>
</div>
<div class="sect1">
-<h2 id="_paragraph"><a class="anchor" href="#_paragraph"></a><a class="link" href="#_paragraph">6. Paragraph</a></h2>
+<h2 id="paragraph"><a class="anchor" href="#paragraph"></a><a class="link" href="#paragraph">6. Paragraph</a></h2>
<div class="sectionbody">
<div class="paragraph">
<div class="title">A Title</div>
@@ -296,7 +296,7 @@ This is next line in paragraph.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_alignment"><a class="anchor" href="#_alignment"></a><a class="link" href="#_alignment">6.1. Alignment</a></h3>
+<h3 id="alignment"><a class="anchor" href="#alignment"></a><a class="link" href="#alignment">6.1. Alignment</a></h3>
<div class="paragraph text-left">
<p>This text is left aligned.</p>
</div>
@@ -311,7 +311,7 @@ This is next line in paragraph.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_line_break"><a class="anchor" href="#_line_break"></a><a class="link" href="#_line_break">6.2. Line break</a></h3>
+<h3 id="line_break"><a class="anchor" href="#line_break"></a><a class="link" href="#line_break">6.2. Line break</a></h3>
<div class="paragraph">
<p>Rubies are red,<br>
Topazes are blue.</p>
@@ -334,7 +334,7 @@ line break</p>
</div>
</div>
<div class="sect1">
-<h2 id="_unconstrained_text_formatting"><a class="anchor" href="#_unconstrained_text_formatting"></a><a class="link" href="#_unconstrained_text_formatting">7. Unconstrained text formatting</a></h2>
+<h2 id="unconstrained_text_formatting"><a class="anchor" href="#unconstrained_text_formatting"></a><a class="link" href="#unconstrained_text_formatting">7. Unconstrained text formatting</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p><code>__A *B*__</code>: <em>A <strong>B</strong></em></p>
@@ -369,7 +369,7 @@ line break</p>
</div>
</div>
<div class="sect1">
-<h2 id="_single_quote"><a class="anchor" href="#_single_quote"></a><a class="link" href="#_single_quote">8. Single quote</a></h2>
+<h2 id="single_quote"><a class="anchor" href="#single_quote"></a><a class="link" href="#single_quote">8. Single quote</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>'` A single quote without end.</p>
@@ -386,7 +386,7 @@ line break</p>
</div>
</div>
<div class="sect1">
-<h2 id="_subscript_and_superscript"><a class="anchor" href="#_subscript_and_superscript"></a><a class="link" href="#_subscript_and_superscript">9. Subscript and superscript</a></h2>
+<h2 id="subscript_and_superscript"><a class="anchor" href="#subscript_and_superscript"></a><a class="link" href="#subscript_and_superscript">9. Subscript and superscript</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>H<sub>2</sub>0 H~ 3 ~0 H~4 ~0 H ~ 5~0 H~6 7~0.</p>
@@ -397,7 +397,7 @@ line break</p>
</div>
</div>
<div class="sect1">
-<h2 id="_constrained_text_formatting"><a class="anchor" href="#_constrained_text_formatting"></a><a class="link" href="#_constrained_text_formatting">10. Constrained text formatting</a></h2>
+<h2 id="constrained_text_formatting"><a class="anchor" href="#constrained_text_formatting"></a><a class="link" href="#constrained_text_formatting">10. Constrained text formatting</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p><code>_A_B</code>: _A_B</p>
@@ -449,10 +449,10 @@ paragraph</strong></em>.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_blocks"><a class="anchor" href="#_blocks"></a><a class="link" href="#_blocks">11. Blocks</a></h2>
+<h2 id="blocks"><a class="anchor" href="#blocks"></a><a class="link" href="#blocks">11. Blocks</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_title"><a class="anchor" href="#_title"></a><a class="link" href="#_title">11.1. Title</a></h3>
+<h3 id="title"><a class="anchor" href="#title"></a><a class="link" href="#title">11.1. Title</a></h3>
<div class="ulist">
<div class="title">TODO list</div>
<ul>
@@ -471,7 +471,7 @@ paragraph</strong></em>.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_block_listing"><a class="anchor" href="#_block_listing"></a><a class="link" href="#_block_listing">12. Block listing</a></h2>
+<h2 id="block_listing"><a class="anchor" href="#block_listing"></a><a class="link" href="#block_listing">12. Block listing</a></h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
@@ -490,7 +490,7 @@ This is not listing.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_block_literal"><a class="anchor" href="#_block_literal"></a><a class="link" href="#_block_literal">13. Block literal</a></h2>
+<h2 id="block_literal"><a class="anchor" href="#block_literal"></a><a class="link" href="#block_literal">13. Block literal</a></h2>
<div class="sectionbody">
<div class="literalblock">
<div class="content">
@@ -515,7 +515,7 @@ A literal named and trailing characters will become paragraph.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_ordered_lists"><a class="anchor" href="#_ordered_lists"></a><a class="link" href="#_ordered_lists">14. Ordered Lists</a></h2>
+<h2 id="ordered_lists"><a class="anchor" href="#ordered_lists"></a><a class="link" href="#ordered_lists">14. Ordered Lists</a></h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
@@ -738,7 +738,7 @@ This line separated by comment.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_unordered_lists"><a class="anchor" href="#_unordered_lists"></a><a class="link" href="#_unordered_lists">15. Unordered Lists</a></h2>
+<h2 id="unordered_lists"><a class="anchor" href="#unordered_lists"></a><a class="link" href="#unordered_lists">15. Unordered Lists</a></h2>
<div class="sectionbody">
<div class="ulist">
<ul>
@@ -959,7 +959,7 @@ This line separated by comment.</p>
</ul>
</div>
<div class="sect2">
-<h3 id="_custom_markers"><a class="anchor" href="#_custom_markers"></a><a class="link" href="#_custom_markers">15.1. Custom markers</a></h3>
+<h3 id="custom_markers"><a class="anchor" href="#custom_markers"></a><a class="link" href="#custom_markers">15.1. Custom markers</a></h3>
<div class="ulist square">
<ul class="square">
<li>
@@ -1032,7 +1032,7 @@ This line separated by comment.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_checklist"><a class="anchor" href="#_checklist"></a><a class="link" href="#_checklist">15.2. Checklist</a></h3>
+<h3 id="checklist"><a class="anchor" href="#checklist"></a><a class="link" href="#checklist">15.2. Checklist</a></h3>
<div class="ulist checklist">
<ul class="checklist">
<li>
@@ -1053,7 +1053,7 @@ This line separated by comment.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_mixed_list"><a class="anchor" href="#_mixed_list"></a><a class="link" href="#_mixed_list">16. Mixed list</a></h2>
+<h2 id="mixed_list"><a class="anchor" href="#mixed_list"></a><a class="link" href="#mixed_list">16. Mixed list</a></h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
@@ -1129,7 +1129,7 @@ This line separated by comment.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_description_list"><a class="anchor" href="#_description_list"></a><a class="link" href="#_description_list">17. Description list</a></h2>
+<h2 id="description_list"><a class="anchor" href="#description_list"></a><a class="link" href="#description_list">17. Description list</a></h2>
<div class="sectionbody">
<div class="dlist">
<dl>
@@ -1456,7 +1456,7 @@ Hard drive
</div>
</div>
<div class="sect1">
-<h2 id="_question_and_answers"><a class="anchor" href="#_question_and_answers"></a><a class="link" href="#_question_and_answers">18. Question and Answers</a></h2>
+<h2 id="question_and_answers"><a class="anchor" href="#question_and_answers"></a><a class="link" href="#question_and_answers">18. Question and Answers</a></h2>
<div class="sectionbody">
<div class="qlist qanda">
<ol>
@@ -1476,7 +1476,7 @@ Hard drive
</div>
</div>
<div class="sect1">
-<h2 id="_table"><a class="anchor" href="#_table"></a><a class="link" href="#_table">19. Table</a></h2>
+<h2 id="table"><a class="anchor" href="#table"></a><a class="link" href="#table">19. Table</a></h2>
<div class="sectionbody">
<table class="tableblock frame-all grid-all stretch">
<colgroup>
@@ -1542,7 +1542,7 @@ D</p></td>
</tbody>
</table>
<div class="sect2">
-<h3 id="_column_formatting"><a class="anchor" href="#_column_formatting"></a><a class="link" href="#_column_formatting">19.1. Column Formatting</a></h3>
+<h3 id="column_formatting"><a class="anchor" href="#column_formatting"></a><a class="link" href="#column_formatting">19.1. Column Formatting</a></h3>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 33.3333%;">
@@ -1630,7 +1630,7 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_cell_formatting"><a class="anchor" href="#_cell_formatting"></a><a class="link" href="#_cell_formatting">19.2. Cell formatting</a></h3>
+<h3 id="cell_formatting"><a class="anchor" href="#cell_formatting"></a><a class="link" href="#cell_formatting">19.2. Cell formatting</a></h3>
<div class="paragraph">
<p>Cell duplicated across three columns,</p>
</div>
@@ -1685,7 +1685,7 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_header_row"><a class="anchor" href="#_header_row"></a><a class="link" href="#_header_row">19.3. Header row</a></h3>
+<h3 id="header_row"><a class="anchor" href="#header_row"></a><a class="link" href="#header_row">19.3. Header row</a></h3>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
@@ -1722,7 +1722,7 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_footer_row"><a class="anchor" href="#_footer_row"></a><a class="link" href="#_footer_row">19.4. Footer row</a></h3>
+<h3 id="footer_row"><a class="anchor" href="#footer_row"></a><a class="link" href="#footer_row">19.4. Footer row</a></h3>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
@@ -1755,7 +1755,7 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_table_width"><a class="anchor" href="#_table_width"></a><a class="link" href="#_table_width">19.5. Table width</a></h3>
+<h3 id="table_width"><a class="anchor" href="#table_width"></a><a class="link" href="#table_width">19.5. Table width</a></h3>
<table class="tableblock frame-all grid-all" style="width: 75%;">
<colgroup>
<col style="width: 50%;">
@@ -1832,9 +1832,9 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_table_borders"><a class="anchor" href="#_table_borders"></a><a class="link" href="#_table_borders">19.6. Table borders</a></h3>
+<h3 id="table_borders"><a class="anchor" href="#table_borders"></a><a class="link" href="#table_borders">19.6. Table borders</a></h3>
<div class="sect3">
-<h4 id="_frame"><a class="anchor" href="#_frame"></a><a class="link" href="#_frame">19.6.1. Frame</a></h4>
+<h4 id="frame"><a class="anchor" href="#frame"></a><a class="link" href="#frame">19.6.1. Frame</a></h4>
<table class="tableblock frame-ends grid-all stretch">
<colgroup>
<col style="width: 33.3333%;">
@@ -1900,7 +1900,7 @@ D</p></td>
</table>
</div>
<div class="sect3">
-<h4 id="_grids"><a class="anchor" href="#_grids"></a><a class="link" href="#_grids">19.6.2. Grids</a></h4>
+<h4 id="grids"><a class="anchor" href="#grids"></a><a class="link" href="#grids">19.6.2. Grids</a></h4>
<table class="tableblock frame-all grid-rows stretch">
<colgroup>
<col style="width: 33.3333%;">
@@ -1967,7 +1967,7 @@ D</p></td>
</div>
</div>
<div class="sect2">
-<h3 id="_striping"><a class="anchor" href="#_striping"></a><a class="link" href="#_striping">19.7. Striping</a></h3>
+<h3 id="striping"><a class="anchor" href="#striping"></a><a class="link" href="#striping">19.7. Striping</a></h3>
<table class="tableblock frame-all grid-all stripes-even stretch">
<colgroup>
<col style="width: 33.3333%;">
@@ -2074,7 +2074,7 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_orientation"><a class="anchor" href="#_orientation"></a><a class="link" href="#_orientation">19.8. Orientation</a></h3>
+<h3 id="orientation"><a class="anchor" href="#orientation"></a><a class="link" href="#orientation">19.8. Orientation</a></h3>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
@@ -2109,7 +2109,7 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_table_caption"><a class="anchor" href="#_table_caption"></a><a class="link" href="#_table_caption">19.9. Table caption</a></h3>
+<h3 id="table_caption"><a class="anchor" href="#table_caption"></a><a class="link" href="#table_caption">19.9. Table caption</a></h3>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. A formal table</caption>
<colgroup>
@@ -2169,7 +2169,7 @@ D</p></td>
</table>
</div>
<div class="sect2">
-<h3 id="_escaping_the_cell_separator"><a class="anchor" href="#_escaping_the_cell_separator"></a><a class="link" href="#_escaping_the_cell_separator">19.10. Escaping the Cell separator</a></h3>
+<h3 id="escaping_the_cell_separator"><a class="anchor" href="#escaping_the_cell_separator"></a><a class="link" href="#escaping_the_cell_separator">19.10. Escaping the Cell separator</a></h3>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
@@ -2198,7 +2198,7 @@ D</p></td>
</div>
</div>
<div class="sect1">
-<h2 id="_horizontal_rules"><a class="anchor" href="#_horizontal_rules"></a><a class="link" href="#_horizontal_rules">20. Horizontal rules</a></h2>
+<h2 id="horizontal_rules"><a class="anchor" href="#horizontal_rules"></a><a class="link" href="#horizontal_rules">20. Horizontal rules</a></h2>
<div class="sectionbody">
<hr>
<div class="paragraph">
@@ -2220,7 +2220,7 @@ D</p></td>
</div>
</div>
<div class="sect1">
-<h2 id="_page_break"><a class="anchor" href="#_page_break"></a><a class="link" href="#_page_break">21. Page break</a></h2>
+<h2 id="page_break"><a class="anchor" href="#page_break"></a><a class="link" href="#page_break">21. Page break</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Before page break.</p>
@@ -2232,7 +2232,7 @@ D</p></td>
</div>
</div>
<div class="sect1">
-<h2 id="_urls"><a class="anchor" href="#_urls"></a><a class="link" href="#_urls">22. URLs</a></h2>
+<h2 id="urls"><a class="anchor" href="#urls"></a><a class="link" href="#urls">22. URLs</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p><a href="https://asciidoctor.org" class="bare">https://asciidoctor.org</a>.</p>
@@ -2261,7 +2261,7 @@ D</p></td>
</div>
</div>
<div class="sect1">
-<h2 id="_anchors"><a class="anchor" href="#_anchors"></a><a class="link" href="#_anchors">23. Anchors</a></h2>
+<h2 id="anchors"><a class="anchor" href="#anchors"></a><a class="link" href="#anchors">23. Anchors</a></h2>
<div class="sectionbody">
<div id="notice" class="paragraph">
<p>This paragraph gets a lot of attention.</p>
@@ -2300,18 +2300,18 @@ D</p></td>
</div>
</div>
<div class="sect1">
-<h2 id="_cross_references"><a class="anchor" href="#_cross_references"></a><a class="link" href="#_cross_references">24. Cross references</a></h2>
+<h2 id="cross_references"><a class="anchor" href="#cross_references"></a><a class="link" href="#cross_references">24. Cross references</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_internal"><a class="anchor" href="#_internal"></a><a class="link" href="#_internal">24.1. Internal</a></h3>
+<h3 id="internal"><a class="anchor" href="#internal"></a><a class="link" href="#internal">24.1. Internal</a></h3>
<div class="paragraph">
-<p>Cross reference with ID <a href="#_anchors">This is anchor</a>.</p>
+<p>Cross reference with ID <a href="#_anchors">_anchors</a>.</p>
</div>
<div class="paragraph">
-<p>Cross reference with block title <a href="#_anchors">This is anchor</a>.</p>
+<p>Cross reference with block title <a href="#anchors">This is anchor</a>.</p>
</div>
<div class="paragraph">
-<p>Cross reference with reftext <a href="#_anchors">This is anchor</a>.</p>
+<p>Cross reference with reftext <a href="#anchors">This is anchor</a>.</p>
</div>
<div class="paragraph">
<p>Cross reference with custom label <a href="#_anchors">custom anchor label</a>.</p>
@@ -2320,7 +2320,7 @@ D</p></td>
</div>
</div>
<div class="sect1">
-<h2 id="_include"><a class="anchor" href="#_include"></a><a class="link" href="#_include">25. Include</a></h2>
+<h2 id="include"><a class="anchor" href="#include"></a><a class="link" href="#include">25. Include</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>This is inside the fragment1.adoc.</p>
@@ -2342,10 +2342,10 @@ type anchor struct {
</div>
</div>
<div class="sect1">
-<h2 id="_images"><a class="anchor" href="#_images"></a><a class="link" href="#_images">26. Images</a></h2>
+<h2 id="images"><a class="anchor" href="#images"></a><a class="link" href="#images">26. Images</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_block_images"><a class="anchor" href="#_block_images"></a><a class="link" href="#_block_images">26.1. Block images</a></h3>
+<h3 id="block_images"><a class="anchor" href="#block_images"></a><a class="link" href="#block_images">26.1. Block images</a></h3>
<div class="imageblock">
<div class="content">
<img src="sunset.jpg" alt="sunset">
@@ -2425,7 +2425,7 @@ This is become paragraph.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_float_group"><a class="anchor" href="#_float_group"></a><a class="link" href="#_float_group">26.2. Float group</a></h3>
+<h3 id="float_group"><a class="anchor" href="#float_group"></a><a class="link" href="#float_group">26.2. Float group</a></h3>
<div class="openblock float-group">
<div class="content">
<div class="imageblock left">
@@ -2447,7 +2447,7 @@ This is become paragraph.</p>
</div>
</div>
<div class="sect2">
-<h3 id="_inline_image"><a class="anchor" href="#_inline_image"></a><a class="link" href="#_inline_image">26.3. Inline image</a></h3>
+<h3 id="inline_image"><a class="anchor" href="#inline_image"></a><a class="link" href="#inline_image">26.3. Inline image</a></h3>
<div class="paragraph">
<p><span class="image"><img src="https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg" alt="Linux" width="25" height="35"></span></p>
</div>
@@ -2465,7 +2465,7 @@ You can find Linux everywhere these days!</p>
</div>
</div>
<div class="sect1">
-<h2 id="_block_open"><a class="anchor" href="#_block_open"></a><a class="link" href="#_block_open">27. Block open</a></h2>
+<h2 id="block_open"><a class="anchor" href="#block_open"></a><a class="link" href="#block_open">27. Block open</a></h2>
<div class="sectionbody">
<div class="openblock">
<div class="title">Section inside</div>
@@ -2478,7 +2478,7 @@ You can find Linux everywhere these days!</p>
</div>
</div>
<div class="sect1">
-<h2 id="_video"><a class="anchor" href="#_video"></a><a class="link" href="#_video">28. Video</a></h2>
+<h2 id="video"><a class="anchor" href="#video"></a><a class="link" href="#video">28. Video</a></h2>
<div class="sectionbody">
<div class="videoblock">
<div class="title">Video without options</div>
@@ -2525,7 +2525,7 @@ Your browser does not support the video tag.
</div>
</div>
<div class="sect1">
-<h2 id="_audio"><a class="anchor" href="#_audio"></a><a class="link" href="#_audio">29. Audio</a></h2>
+<h2 id="audio"><a class="anchor" href="#audio"></a><a class="link" href="#audio">29. Audio</a></h2>
<div class="sectionbody">
<div class="audioblock">
<div class="content">
@@ -2537,10 +2537,10 @@ Your browser does not support the audio tag.
</div>
</div>
<div class="sect1">
-<h2 id="_admonition"><a class="anchor" href="#_admonition"></a><a class="link" href="#_admonition">30. Admonition</a></h2>
+<h2 id="admonition"><a class="anchor" href="#admonition"></a><a class="link" href="#admonition">30. Admonition</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_line_admonition"><a class="anchor" href="#_line_admonition"></a><a class="link" href="#_line_admonition">30.1. Line admonition</a></h3>
+<h3 id="line_admonition"><a class="anchor" href="#line_admonition"></a><a class="link" href="#line_admonition">30.1. Line admonition</a></h3>
<div class="paragraph">
<p>Admonition between a paragraph.
WARNING: Wolpertingers are known to nest in server racks.
@@ -2627,7 +2627,7 @@ admonition followed by list
</div>
</div>
<div class="sect2">
-<h3 id="_style_admonition"><a class="anchor" href="#_style_admonition"></a><a class="link" href="#_style_admonition">30.2. Style admonition</a></h3>
+<h3 id="style_admonition"><a class="anchor" href="#style_admonition"></a><a class="link" href="#style_admonition">30.2. Style admonition</a></h3>
<div class="admonitionblock important">
<table>
<tr>
@@ -2713,7 +2713,7 @@ Literal paragraph with admonition.
</div>
</div>
<div class="sect2">
-<h3 id="_icons"><a class="anchor" href="#_icons"></a><a class="link" href="#_icons">30.3. Icons</a></h3>
+<h3 id="icons"><a class="anchor" href="#icons"></a><a class="link" href="#icons">30.3. Icons</a></h3>
<div class="admonitionblock warning">
<table>
<tr>
@@ -2731,7 +2731,7 @@ Enter at your own risk.
</div>
</div>
<div class="sect1">
-<h2 id="_sidebar"><a class="anchor" href="#_sidebar"></a><a class="link" href="#_sidebar">31. Sidebar</a></h2>
+<h2 id="sidebar"><a class="anchor" href="#sidebar"></a><a class="link" href="#sidebar">31. Sidebar</a></h2>
<div class="sectionbody">
<div class="sidebarblock">
<div class="content">
@@ -2761,7 +2761,7 @@ for producing professional documents like DocBook and LaTeX.</p>
</div>
</div>
<div class="sect1">
-<h2 id="_example"><a class="anchor" href="#_example"></a><a class="link" href="#_example">32. Example</a></h2>
+<h2 id="example"><a class="anchor" href="#example"></a><a class="link" href="#example">32. Example</a></h2>
<div class="sectionbody">
<div class="exampleblock">
<div class="title">Example 1. Sample document</div>
@@ -2786,7 +2786,7 @@ This guide provides...</pre>
</div>
</div>
<div class="sect1">
-<h2 id="_quote"><a class="anchor" href="#_quote"></a><a class="link" href="#_quote">33. Quote</a></h2>
+<h2 id="quote"><a class="anchor" href="#quote"></a><a class="link" href="#quote">33. Quote</a></h2>
<div class="sectionbody">
<div class="quoteblock">
<blockquote>
@@ -2825,7 +2825,7 @@ Everybody remember where we parked.
</div>
</div>
<div class="sect2">
-<h3 id="_quoted_paragraph"><a class="anchor" href="#_quoted_paragraph"></a><a class="link" href="#_quoted_paragraph">33.1. Quoted paragraph</a></h3>
+<h3 id="quoted_paragraph"><a class="anchor" href="#quoted_paragraph"></a><a class="link" href="#quoted_paragraph">33.1. Quoted paragraph</a></h3>
<div class="quoteblock">
<blockquote>
I hold it that a little rebellion now and then is a good thing,
@@ -2886,7 +2886,7 @@ a quote
</div>
</div>
<div class="sect1">
-<h2 id="_verse"><a class="anchor" href="#_verse"></a><a class="link" href="#_verse">34. Verse</a></h2>
+<h2 id="verse"><a class="anchor" href="#verse"></a><a class="link" href="#verse">34. Verse</a></h2>
<div class="sectionbody">
<div class="verseblock">
<pre class="content">The fog comes
@@ -2912,13 +2912,13 @@ and then moves on.</pre>
</div>
</div>
<div class="sect1">
-<h2 id="_passthrough"><a class="anchor" href="#_passthrough"></a><a class="link" href="#_passthrough">35. Passthrough</a></h2>
+<h2 id="passthrough"><a class="anchor" href="#passthrough"></a><a class="link" href="#passthrough">35. Passthrough</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p><code><em>A <strong>B</strong></em>+</code></p>
</div>
<div class="sect2">
-<h3 id="_block_passthrough"><a class="anchor" href="#_block_passthrough"></a><a class="link" href="#_block_passthrough">35.1. Block passthrough</a></h3>
+<h3 id="block_passthrough"><a class="anchor" href="#block_passthrough"></a><a class="link" href="#block_passthrough">35.1. Block passthrough</a></h3>
<video poster="images/movie-reel.png">
<source src="videos/writing-zen.webm" type="video/webm">
</video>
@@ -2926,21 +2926,21 @@ and then moves on.</pre>
</div>
</div>
<div class="sect1">
-<h2 id="_section_discrete"><a class="anchor" href="#_section_discrete"></a><a class="link" href="#_section_discrete">36. Section Discrete</a></h2>
+<h2 id="section_discrete"><a class="anchor" href="#section_discrete"></a><a class="link" href="#section_discrete">36. Section Discrete</a></h2>
<div class="sectionbody">
-<h3 id="_discrete" class="discrete">Discrete</h3>
+<h3 id="discrete" class="discrete">Discrete</h3>
<div class="paragraph">
<p>This is content of discrete section.</p>
</div>
<div class="sect2">
-<h3 id="_after_discrete"><a class="anchor" href="#_after_discrete"></a><a class="link" href="#_after_discrete">36.1. After discrete</a></h3>
+<h3 id="after_discrete"><a class="anchor" href="#after_discrete"></a><a class="link" href="#after_discrete">36.1. After discrete</a></h3>
<div class="sidebarblock">
<div class="content">
<div class="paragraph">
<p>Discrete headings are useful for making headings inside of other blocks, like
this sidebar.</p>
</div>
-<h2 id="_discrete_heading" class="discrete">Discrete Heading</h2>
+<h2 id="discrete_heading" class="discrete">Discrete Heading</h2>
<div class="paragraph">
<p>Discrete headings can be used where sections are not permitted.</p>
</div>