diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-11-23 19:15:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-11-23 19:15:33 +0000 |
commit | 279829ba6d23d54e839d406a2418cd09303eee77 (patch) | |
tree | 6903e86ce3e309f3ad5bb58941cbdcd367d19ae6 /usr.bin/mandoc/html.c | |
parent | c0a51598ee07cb9ed6a3a6f44f5635896b86588d (diff) |
When a font escape appears in the middle of a string,
make sure it doesn't cause output of bogus whitespace.
Fixing a bug reported by Pali dot Rohar at gmail dot com.
Diffstat (limited to 'usr.bin/mandoc/html.c')
-rw-r--r-- | usr.bin/mandoc/html.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c index 948d43da915..a76a96ce269 100644 --- a/usr.bin/mandoc/html.c +++ b/usr.bin/mandoc/html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: html.c,v 1.112 2018/10/25 01:21:30 schwarze Exp $ */ +/* $OpenBSD: html.c,v 1.113 2018/11/23 19:15:32 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -414,8 +414,11 @@ print_encode(struct html *h, const char *p, const char *pend, int norecurse) case ESCAPE_FONTBI: case ESCAPE_FONTCW: case ESCAPE_FONTROMAN: - if (0 == norecurse) + if (0 == norecurse) { + h->flags |= HTML_NOSPACE; print_metaf(h, esc); + h->flags &= ~HTML_NOSPACE; + } continue; case ESCAPE_SKIPCHAR: h->flags |= HTML_SKIPCHAR; |