From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 146188ea for ; Mon, 31 Dec 2018 05:36:27 -0500 (EST) Date: Mon, 31 Dec 2018 05:36:27 -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: Cleanup, no functional change: Stop trying to keep fill mode X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <05f8623cf327a092@fantadrom.bsd.lv> Log Message: ----------- Cleanup, no functional change: Stop trying to keep fill mode state locally in the mdoc HTML formatter, rely on the state stored in the nodes instead. Note that the .Bd -literal code is buggy. Nested literal displays result in nested
 elements, which violates HTML syntax.
But i'm not yet fixing bugs in this commit, i'm merely deleting 
code which has no effect.

Modified Files:
--------------
    mandoc:
        mdoc_html.c

Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v
retrieving revision 1.321
retrieving revision 1.322
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.321 -r1.322
--- mdoc_html.c
+++ mdoc_html.c
@@ -366,7 +366,8 @@ print_mdoc_node(MDOC_ARGS)
 		 * (i.e., within a 
) don't print the newline.
 		 */
 		if (*n->string == ' ' && n->flags & NODE_LINE &&
-		    (h->flags & (HTML_LITERAL | HTML_NONEWLINE)) == 0)
+		    (h->flags & HTML_NONEWLINE) == 0 &&
+		    (n->flags & NODE_NOFILL) == 0)
 			print_otag(h, TAG_BR, "");
 		if (NODE_DELIMC & n->flags)
 			h->flags |= HTML_NOSPACE;
@@ -915,7 +916,7 @@ mdoc_sx_pre(MDOC_ARGS)
 static int
 mdoc_bd_pre(MDOC_ARGS)
 {
-	int			 comp, sv;
+	int			 comp;
 	struct roff_node	*nn;
 
 	if (n->type == ROFFT_HEAD)
@@ -949,12 +950,6 @@ mdoc_bd_pre(MDOC_ARGS)
 		return 1;
 
 	print_otag(h, TAG_PRE, "c", "Li");
-
-	/* This can be recursive: save & set our literal state. */
-
-	sv = h->flags & HTML_LITERAL;
-	h->flags |= HTML_LITERAL;
-
 	for (nn = n->child; nn; nn = nn->next) {
 		print_mdoc_node(meta, nn, h);
 		/*
@@ -983,10 +978,6 @@ mdoc_bd_pre(MDOC_ARGS)
 
 		h->flags |= HTML_NOSPACE;
 	}
-
-	if (0 == sv)
-		h->flags &= ~HTML_LITERAL;
-
 	return 0;
 }
 
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv