summaryrefslogtreecommitdiffstats
path: root/mandoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-10-25 01:32:40 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-10-25 01:32:40 +0000
commitc5692d062ca3cb8eb15948d7fbc2f5eb68be6cda (patch)
tree94de759c7f7feb9b61764095e908e723f0ae0499 /mandoc.c
parente4c12a05e0760bea4427e66a5914d9fed0111dee (diff)
downloadmandoc-c5692d062ca3cb8eb15948d7fbc2f5eb68be6cda.tar.gz
Implement the \f(CW and \f(CR (constant width font) escape sequences
for HTML output. Somewhat relevant because pod2man(1) relies on this. Missing feature reported by Pali dot Rohar at gmail dot com. Note that constant width font was already correctly selected before this when required by semantic markup. Only attempting physical markup with the low-level escape sequence was ineffective.
Diffstat (limited to 'mandoc.c')
-rw-r--r--mandoc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mandoc.c b/mandoc.c
index f9cfa4ea..d2396c2a 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -304,8 +304,13 @@ mandoc_escape(const char **end, const char **start, int *sz)
case ESCAPE_FONT:
if (*sz == 2) {
if (**start == 'C') {
+ if ((*start)[1] == 'W' ||
+ (*start)[1] == 'R') {
+ gly = ESCAPE_FONTCW;
+ break;
+ }
/*
- * Treat constant-width font modes
+ * Treat other constant-width font modes
* just like regular font modes.
*/
(*start)++;