source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Fix a violation of the HTML 5 standard (paragraph 4.5.6 "The
@ 2025-01-25  0:22 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2025-01-25  0:22 UTC (permalink / raw)
  To: source

Log Message:
-----------
Fix a violation of the HTML 5 standard (paragraph 4.5.6 "The cite element").
It is intended for titles, not to wrap complete citation blocks.

Found in a conversation with job@ and tb@.

Modified Files:
--------------
    mandoc:
        mdoc_html.c
    mandoc/regress/mdoc/Rs:
        journal.out_html
        outside.out_html
        paragraph.out_html
        rfc.out_html

Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.352 -r1.353
--- mdoc_html.c
+++ mdoc_html.c
@@ -1456,7 +1456,7 @@ mdoc_rs_pre(MDOC_ARGS)
 	case ROFFT_BODY:
 		if (n->sec == SEC_SEE_ALSO)
 			print_otag(h, TAG_P, "c", "Pp");
-		print_otag(h, TAG_CITE, "c", "Rs");
+		print_otag(h, TAG_SPAN, "c", "Rs");
 		break;
 	default:
 		abort();
@@ -1510,7 +1510,7 @@ mdoc__x_pre(MDOC_ARGS)
 			print_text(h, "and");
 		break;
 	case MDOC__B:
-		t = TAG_I;
+		t = TAG_CITE;
 		cattr = "RsB";
 		break;
 	case MDOC__C:
@@ -1555,6 +1555,7 @@ mdoc__x_pre(MDOC_ARGS)
 		cattr = "RsR";
 		break;
 	case MDOC__T:
+		t = TAG_CITE;
 		if (n->parent != NULL && n->parent->tok == MDOC_Rs &&
 		    n->parent->norm->Rs.quote_T) {
 			print_text(h, "\\(lq");
Index: outside.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Rs/outside.out_html,v
diff -Lregress/mdoc/Rs/outside.out_html -Lregress/mdoc/Rs/outside.out_html -u -p -r1.1 -r1.2
--- regress/mdoc/Rs/outside.out_html
+++ regress/mdoc/Rs/outside.out_html
@@ -1,4 +1,4 @@
 <p class="Pp">Some percent-macros can be used outside reference blocks. For
-    example, let's study <i class="RsB">The Book of PF</i> and relax reading
-    <span class="RsB">A Standard for the Transmission of IP Datagrams on Avian
-    Carriers</span> afterwards.</p>
+    example, let's study <cite class="RsB">The Book of PF</cite> and relax
+    reading <cite class="RsB">A Standard for the Transmission of IP Datagrams on
+    Avian Carriers</cite> afterwards.</p>
Index: paragraph.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Rs/paragraph.out_html,v
diff -Lregress/mdoc/Rs/paragraph.out_html -Lregress/mdoc/Rs/paragraph.out_html -u -p -r1.6 -r1.7
--- regress/mdoc/Rs/paragraph.out_html
+++ regress/mdoc/Rs/paragraph.out_html
@@ -1,15 +1,15 @@
   <br/>
-  initial reference: <cite class="Rs"><span class="RsA">author name</span>,
-    <i class="RsB">book title</i>.</cite></p>
-<p class="Pp">in a paragraph: <cite class="Rs"><span class="RsA">another
-    author</span>, <i class="RsB">another book</i>.</cite></p>
+  initial reference: <span class="Rs"><span class="RsA">author name</span>,
+    <cite class="RsB">book title</cite>.</span></p>
+<p class="Pp">in a paragraph: <span class="Rs"><span class="RsA">another
+    author</span>, <cite class="RsB">another book</cite>.</span></p>
 </section>
 <section class="Sh">
 <h2 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
   ALSO</a></h2>
 <p class="Pp">initial reference:</p>
-<p class="Pp"><cite class="Rs"><span class="RsA">author name</span>,
-    <i class="RsB">book title</i>.</cite></p>
+<p class="Pp"><span class="Rs"><span class="RsA">author name</span>,
+    <cite class="RsB">book title</cite>.</span></p>
 <p class="Pp">in a paragraph:</p>
-<p class="Pp"><cite class="Rs"><span class="RsA">another author</span>,
-    <i class="RsB">another book</i>.</cite></p>
+<p class="Pp"><span class="Rs"><span class="RsA">another author</span>,
+    <cite class="RsB">another book</cite>.</span></p>
Index: rfc.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Rs/rfc.out_html,v
diff -Lregress/mdoc/Rs/rfc.out_html -Lregress/mdoc/Rs/rfc.out_html -u -p -r1.2 -r1.3
--- regress/mdoc/Rs/rfc.out_html
+++ regress/mdoc/Rs/rfc.out_html
@@ -1,5 +1,5 @@
-<p class="Pp"><cite class="Rs"><span class="RsA">David Waitzman</span>,
-    <span class="RsB">A Standard for the Transmission of IP Datagrams on Avian
-    Carriers</span>,
+<p class="Pp"><span class="Rs"><span class="RsA">David Waitzman</span>,
+    <cite class="RsB">A Standard for the Transmission of IP Datagrams on Avian
+    Carriers</cite>,
     <a class="RsR" href="https://www.rfc-editor.org/rfc/rfc1149.html">RFC
-    1149</a>, <span class="RsD">April 1990</span>.</cite></p>
+    1149</a>, <span class="RsD">April 1990</span>.</span></p>
Index: journal.out_html
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Rs/journal.out_html,v
diff -Lregress/mdoc/Rs/journal.out_html -Lregress/mdoc/Rs/journal.out_html -u -p -r1.1 -r1.2
--- regress/mdoc/Rs/journal.out_html
+++ regress/mdoc/Rs/journal.out_html
@@ -1,5 +1,5 @@
-<p class="Pp"><cite class="Rs"><span class="RsA">Brian W. Kernighan</span> and
-    <span class="RsA">Lorinda L. Cherry</span>, &#x201C;<span class="RsT">System
-    for Typesetting Mathematics</span>&#x201D;, <i class="RsJ">Communications of
+<p class="Pp"><span class="Rs"><span class="RsA">Brian W. Kernighan</span> and
+    <span class="RsA">Lorinda L. Cherry</span>, &#x201C;<cite class="RsT">System
+    for Typesetting Mathematics</cite>&#x201D;, <i class="RsJ">Communications of
     the ACM</i>, <span class="RsV">18</span>, <span class="RsP">pp.
-    151&#x2013;157</span>, <span class="RsD">March 1975</span>.</cite></p>
+    151&#x2013;157</span>, <span class="RsD">March 1975</span>.</span></p>
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-25  0:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-25  0:22 mandoc: Fix a violation of the HTML 5 standard (paragraph 4.5.6 "The schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).