diff options
author | 2018-08-20 18:06:56 +0000 | |
---|---|---|
committer | 2018-08-20 18:06:56 +0000 | |
commit | 90f42c1ca55bc5c689d6936a5fe3eaf6312e5208 (patch) | |
tree | 3c3e38983cccaeb29fc04d83f0e190ba9393f1b4 /mandoc.c | |
parent | e0b77e5e8f276f44afbb5520fbcaab68991655b2 (diff) | |
download | mandoc-90f42c1ca55bc5c689d6936a5fe3eaf6312e5208.tar.gz mandoc-90f42c1ca55bc5c689d6936a5fe3eaf6312e5208.tar.zst mandoc-90f42c1ca55bc5c689d6936a5fe3eaf6312e5208.zip |
\f[] means \fP, not \fR
Diffstat (limited to 'mandoc.c')
-rw-r--r-- | mandoc.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandoc.c,v 1.106 2018/08/16 13:54:06 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.107 2018/08/20 18:06:56 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -302,8 +302,8 @@ mandoc_escape(const char **end, const char **start, int *sz) switch (gly) { case ESCAPE_FONT: - if (2 == *sz) { - if ('C' == **start) { + if (*sz == 2) { + if (**start == 'C') { /* * Treat constant-width font modes * just like regular font modes. @@ -311,12 +311,15 @@ mandoc_escape(const char **end, const char **start, int *sz) (*start)++; (*sz)--; } else { - if ('B' == (*start)[0] && 'I' == (*start)[1]) + if ((*start)[0] == 'B' && (*start)[1] == 'I') gly = ESCAPE_FONTBI; break; } - } else if (1 != *sz) + } else if (*sz != 1) { + if (*sz == 0) + gly = ESCAPE_FONTPREV; break; + } switch (**start) { case '3': |