diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-11-23 19:17:05 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-11-23 19:17:05 +0000 |
commit | 37756bb69b45c6e10a934e8b40cab0cb8e614fab (patch) | |
tree | 73a6f193ac90222add789518f4ff9b217a8087c4 /html.c | |
parent | ff5d8eb0330aa41fed303bf6c942ce2cb663a51e (diff) | |
download | mandoc-37756bb69b45c6e10a934e8b40cab0cb8e614fab.tar.gz |
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 'html.c')
-rw-r--r-- | html.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -416,8 +416,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; |