aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-06 22:06:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-06 22:06:23 +0000
commit42daeb33f995857a79a8630b58e3c8444aa9f9b9 (patch)
tree5b2da1f9af931c37896a5f83124bba1aac009045
parent9572664060cc4b498a5ac667a2e93e8b2df803d9 (diff)
downloadmandoc-42daeb33f995857a79a8630b58e3c8444aa9f9b9.tar.gz
mandoc-42daeb33f995857a79a8630b58e3c8444aa9f9b9.tar.zst
mandoc-42daeb33f995857a79a8630b58e3c8444aa9f9b9.zip
Do not mistreat empty arguments to font alternating macros
as vertical spacing requests. Bug found with xmahjongg(6).
-rw-r--r--TODO7
-rw-r--r--man_term.c7
2 files changed, 11 insertions, 3 deletions
diff --git a/TODO b/TODO
index 4cb996f0..03d8e92a 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
************************************************************************
* Official mandoc TODO.
-* $Id: TODO,v 1.204 2015/04/03 12:41:02 schwarze Exp $
+* $Id: TODO,v 1.205 2015/04/06 22:06:23 schwarze Exp $
************************************************************************
Many issues are annotated for difficulty as follows:
@@ -66,6 +66,7 @@ are mere guesses, and some may be wrong.
loc * exist * algo * size * imp **
- .ns (no-space mode) occurs in xine-config(1)
+ when implementing this, also let .TH set it
reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500
loc *** exist *** algo *** size ** imp *
@@ -479,6 +480,10 @@ are mere guesses, and some may be wrong.
found while talking to Chris Bennett
loc * exist * algo * size * imp *
+- Sequences of multiple man(7) paragraphs (.PP, .IP) interspersed
+ with .ps and .nf/.fi produce execessive blank lines, see libJudy
+ The parser reorg may help with this.
+
- trailing whitespace must be ignored even when followed by a font escape,
see for example
makes
diff --git a/man_term.c b/man_term.c
index a96c309b..9e7f4358 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.178 2015/04/06 14:59:21 schwarze Exp $ */
+/* $Id: man_term.c,v 1.179 2015/04/06 22:06:23 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -321,7 +321,10 @@ pre_alternate(DECL_ARGS)
term_fontrepl(p, font[i]);
if (savelit && NULL == nn->next)
mt->fl |= MANT_LITERAL;
- print_man_node(p, mt, nn, meta);
+ assert(nn->type == ROFFT_TEXT);
+ term_word(p, nn->string);
+ if (nn->flags & MAN_EOS)
+ p->flags |= TERMP_SENTENCE;
if (nn->next)
p->flags |= TERMP_NOSPACE;
}