From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 31646 invoked from network); 20 Apr 2020 13:08:00 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with UTF8ESMTPZ; 20 Apr 2020 13:08:00 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 02cc1fc6 for ; Mon, 20 Apr 2020 08:07:58 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 149b8cd2 for ; Mon, 20 Apr 2020 08:07:58 -0500 (EST) Date: Mon, 20 Apr 2020 08:07:58 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: In fragment identifiers, use ~%d for ordinal suffixes, and X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <8a57bef8102da96d@mandoc.bsd.lv> Log Message: ----------- In fragment identifiers, use ~%d for ordinal suffixes, and reserve the character '~' for that purpose. Bug found by validator.w3.org in openssl(1), which contains both a tag "tls1_2" and a second instance of a tag "tls1", which also resulted in "tls1_2", causing a clash. Now, the second instance of "tls1" is rendered as "tls1~2" instead, employing the newly reserved '~'. Modified Files: -------------- mandoc: html.c mandoc/regress/man/IP: literal.out_html mandoc/regress/man/TP: literal.out_html vert.out_html mandoc/regress/mdoc/Bd: nested.out_html mandoc/regress/mdoc/Sh: tag.out_html Revision Data ------------- Index: vert.out_html =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/man/TP/vert.out_html,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/man/TP/vert.out_html -Lregress/man/TP/vert.out_html -u -p -r1.2 -r1.3 --- regress/man/TP/vert.out_html +++ regress/man/TP/vert.out_html @@ -4,6 +4,6 @@
text
-
+
text
Index: literal.out_html =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/man/TP/literal.out_html,v retrieving revision 1.3 retrieving revision 1.4 diff -Lregress/man/TP/literal.out_html -Lregress/man/TP/literal.out_html -u -p -r1.3 -r1.4 --- regress/man/TP/literal.out_html +++ regress/man/TP/literal.out_html @@ -8,7 +8,7 @@ literal text
-
+
 indented
Index: html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/html.c,v
retrieving revision 1.269
retrieving revision 1.270
diff -Lhtml.c -Lhtml.c -u -p -r1.269 -r1.270
--- html.c
+++ html.c
@@ -383,11 +383,12 @@ html_make_id(const struct roff_node *n, 
 	 * 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, 
 
 	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;
Index: literal.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/IP/literal.out_html,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/man/IP/literal.out_html -Lregress/man/IP/literal.out_html -u -p -r1.5 -r1.6
--- regress/man/IP/literal.out_html
+++ regress/man/IP/literal.out_html
@@ -8,7 +8,7 @@ literal
 text
 
-
+
 indented
@@ -32,7 +32,7 @@ literal
 text
 
-
+
 indented
@@ -48,7 +48,7 @@ text
   out of indented paragraph
 

regular text

-
+
indented regular text
 indented
Index: nested.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/nested.out_html,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/mdoc/Bd/nested.out_html -Lregress/mdoc/Bd/nested.out_html -u -p -r1.1 -r1.2
--- regress/mdoc/Bd/nested.out_html
+++ regress/mdoc/Bd/nested.out_html
@@ -8,10 +8,10 @@
 outer text
 regular text
 
text + Bd-indent" id="outer~2"> text (4n)
text + Bd-indent" id="inner~2"> text (2n)
outer text
Index: tag.out_html =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Sh/tag.out_html,v retrieving revision 1.3 retrieving revision 1.4 diff -Lregress/mdoc/Sh/tag.out_html -Lregress/mdoc/Sh/tag.out_html -u -p -r1.3 -r1.4 --- regress/mdoc/Sh/tag.out_html +++ regress/mdoc/Sh/tag.out_html @@ -2,7 +2,7 @@
-

+

Text in duplicate description section.

-- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv