diff options
-rw-r--r-- | html.c | 5 | ||||
-rw-r--r-- | regress/man/IP/literal.out_html | 6 | ||||
-rw-r--r-- | regress/man/TP/literal.out_html | 2 | ||||
-rw-r--r-- | regress/man/TP/vert.out_html | 2 | ||||
-rw-r--r-- | regress/mdoc/Bd/nested.out_html | 4 | ||||
-rw-r--r-- | regress/mdoc/Sh/tag.out_html | 2 |
6 files changed, 11 insertions, 10 deletions
@@ -383,11 +383,12 @@ html_make_id(const struct roff_node *n, int unique) * permitted in URL-fragment strings according to the * explicit list at: * https://url.spec.whatwg.org/#url-fragment-string + * In addition, reserve '~' for ordinal suffixes. */ for (cp = buf; *cp != '\0'; cp++) if (isalnum((unsigned char)*cp) == 0 && - strchr("!$&'()*+,-./:;=?@_~", *cp) == NULL) + strchr("!$&'()*+,-./:;=?@_", *cp) == NULL) *cp = '_'; if (unique == 0) @@ -407,7 +408,7 @@ html_make_id(const struct roff_node *n, int unique) if (entry->ord > 1) { cp = buf; - mandoc_asprintf(&buf, "%s_%d", cp, entry->ord); + mandoc_asprintf(&buf, "%s~%d", cp, entry->ord); free(cp); } return buf; diff --git a/regress/man/IP/literal.out_html b/regress/man/IP/literal.out_html index 3b9cc429..aa0536e7 100644 --- a/regress/man/IP/literal.out_html +++ b/regress/man/IP/literal.out_html @@ -8,7 +8,7 @@ literal text </pre> <dl class="Bl-tag"> - <dt id="tag_2"><a class="permalink" href="#tag_2">tag</a></dt> + <dt id="tag~2"><a class="permalink" href="#tag~2">tag</a></dt> <dd> <pre> indented @@ -32,7 +32,7 @@ literal text </pre> <dl class="Bl-tag"> - <dt id="tag_3"><a class="permalink" href="#tag_3">tag</a></dt> + <dt id="tag~3"><a class="permalink" href="#tag~3">tag</a></dt> <dd> <pre> indented @@ -48,7 +48,7 @@ text out of indented paragraph</a></h2> <p class="Pp">regular text</p> <dl class="Bl-tag"> - <dt id="tag_4"><a class="permalink" href="#tag_4">tag</a></dt> + <dt id="tag~4"><a class="permalink" href="#tag~4">tag</a></dt> <dd>indented regular text <pre> indented diff --git a/regress/man/TP/literal.out_html b/regress/man/TP/literal.out_html index 8b818ed8..914c7b5c 100644 --- a/regress/man/TP/literal.out_html +++ b/regress/man/TP/literal.out_html @@ -8,7 +8,7 @@ literal text </pre> <dl class="Bl-tag"> - <dt id="tag_2"><a class="permalink" href="#tag_2">tag</a></dt> + <dt id="tag~2"><a class="permalink" href="#tag~2">tag</a></dt> <dd> <pre> indented diff --git a/regress/man/TP/vert.out_html b/regress/man/TP/vert.out_html index 1124ed33..4499432b 100644 --- a/regress/man/TP/vert.out_html +++ b/regress/man/TP/vert.out_html @@ -4,6 +4,6 @@ <dl class="Bl-tag"> <dt id="tag"><a class="permalink" href="#tag">tag</a></dt> <dd>text</dd> - <dt id="tag_2"><a class="permalink" href="#tag_2">tag</a></dt> + <dt id="tag~2"><a class="permalink" href="#tag~2">tag</a></dt> <dd>text</dd> </dl> diff --git a/regress/mdoc/Bd/nested.out_html b/regress/mdoc/Bd/nested.out_html index bc71c270..94761895 100644 --- a/regress/mdoc/Bd/nested.out_html +++ b/regress/mdoc/Bd/nested.out_html @@ -8,10 +8,10 @@ outer text</div> regular text <div class="Bd Pp - Bd-indent" id="outer_2"><a class="permalink" href="#outer_2">outer</a> text + Bd-indent" id="outer~2"><a class="permalink" href="#outer~2">outer</a> text (4n) <div class="Bd Pp - Bd-indent" id="inner_2"><a class="permalink" href="#inner_2">inner</a> text + Bd-indent" id="inner~2"><a class="permalink" href="#inner~2">inner</a> text (2n)</div> outer text <dl class="Bl-tag"> diff --git a/regress/mdoc/Sh/tag.out_html b/regress/mdoc/Sh/tag.out_html index d99c6d4d..0dd39398 100644 --- a/regress/mdoc/Sh/tag.out_html +++ b/regress/mdoc/Sh/tag.out_html @@ -2,7 +2,7 @@ </section> </section> <section class="Sh"> -<h1 class="Sh" id="DESCRIPTION_2"><a class="permalink" href="#DESCRIPTION_2">DESCRIPTION</a></h1> +<h1 class="Sh" id="DESCRIPTION~2"><a class="permalink" href="#DESCRIPTION~2">DESCRIPTION</a></h1> <p class="Pp">Text in duplicate description section.</p> </section> <section class="Sh"> |