aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tag.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-07-22 03:21:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-07-22 03:21:49 +0000
commit72cf85a98bb1b2a6ef04b580cfa7c6a0d5ae1b24 (patch)
tree7c7db3ec0c82618c4252ee155b51afe44c029836 /tag.c
parentf3471bbe850e1ceab86fe35bf08aed11dfa7a465 (diff)
downloadmandoc-72cf85a98bb1b2a6ef04b580cfa7c6a0d5ae1b24.tar.gz
mandoc-72cf85a98bb1b2a6ef04b580cfa7c6a0d5ae1b24.tar.zst
mandoc-72cf85a98bb1b2a6ef04b580cfa7c6a0d5ae1b24.zip
Slowly start implementing tagging support for man(7) pages, even
though it is obvious that this can never become as good as for mdoc(7) pages. As a first step, tag alphabetic arguments of .IP macros, which are often used for lists of options and keywords. Try "man -O tag=g as" to get the point. Thanks to Leah Neukirchen for recently reminding me that exploring how much can be done in this respect may be worthwhile: it is likely to slightly improve usability while adding only small amounts of relatively straightforward code.
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tag.c b/tag.c
index 43571c7f..d5e7f89c 100644
--- a/tag.c
+++ b/tag.c
@@ -1,4 +1,4 @@
-/* $Id: tag.c,v 1.23 2019/07/19 20:27:25 schwarze Exp $ */
+/* $Id: tag.c,v 1.24 2019/07/22 03:21:50 schwarze Exp $ */
/*
* Copyright (c) 2015, 2016, 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -151,11 +151,11 @@ tag_put(const char *s, int prio, size_t line)
s += 2;
/*
- * Skip whitespace and whatever follows it,
+ * Skip whitespace and escapes and whatever follows,
* and if there is any, downgrade the priority.
*/
- len = strcspn(s, " \t");
+ len = strcspn(s, " \t\\");
if (len == 0)
return;