From 94cd81895ea53a20400d13b0e9c2bcf756ed382b Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 26 Jan 2017 18:28:18 +0000 Subject: Fix -man -Thtml formatting after .nf (which has nothing to do with "literal", by the way, it means "no fill"): * Use
 such that whitespace is preserved.
* Preserve lines breaks.
* For font alternating macros, avoid node recursion which required
scary juggling with the fill state.  Instead, simply print the text
children directly.

Missing feature first noticed by kristaps@ in 2011,
the again reported by afresh1@ in 2016,
and finally reported here: https://github.com/Debian/debiman/issues/21 ,
which i only found because of Shane Kerr's comment here:
https://plus.google.com/110314300533310775053/posts/H1eaw9Yskoc
---
 html.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'html.c')

diff --git a/html.c b/html.c
index cee98aea..7af682e7 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/*	$Id: html.c,v 1.201 2017/01/25 02:14:43 schwarze Exp $ */
+/*	$Id: html.c,v 1.202 2017/01/26 18:28:18 schwarze Exp $ */
 /*
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons 
  * Copyright (c) 2011-2015, 2017 Ingo Schwarze 
@@ -114,7 +114,6 @@ static	const char	*const roffscales[SCALE_MAX] = {
 
 static	void	 a2width(const char *, struct roffsu *);
 static	void	 print_byte(struct html *, char);
-static	void	 print_endline(struct html *);
 static	void	 print_endword(struct html *);
 static	void	 print_indent(struct html *);
 static	void	 print_word(struct html *, const char *);
@@ -812,7 +811,7 @@ print_byte(struct html *h, char c)
  * If something was printed on the current output line, end it.
  * Not to be called right after print_indent().
  */
-static void
+void
 print_endline(struct html *h)
 {
 	if (h->col == 0)
-- 
cgit v1.2.3