summaryrefslogtreecommitdiffstats
path: root/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-22 13:25:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-22 13:25:17 +0000
commitab5a9a1881b1ab2422deff11642a442c897fa8d3 (patch)
tree19807396c340368d9140231699517e8e3e2652ca /man_macro.c
parent832bba5f4dbdabe6666da2983f9962dbe565ed51 (diff)
downloadmandoc-ab5a9a1881b1ab2422deff11642a442c897fa8d3.tar.gz
Implement end-of-sentence spacing at the end of man(7) macro lines.
Patch from Franco Fichtner <franco at lastsummer dot de> (DragonFly).
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/man_macro.c b/man_macro.c
index 64597269..16d68d92 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -432,6 +432,15 @@ in_line_eoln(MACRO_PROT_ARGS)
}
/*
+ * Append MAN_EOS in case the last snipped argument
+ * ends with a dot, e.g. `.IR syslog (3).'
+ */
+
+ if (n != man->last &&
+ mandoc_eos(man->last->string, strlen(man->last->string), 0))
+ man->last->flags |= MAN_EOS;
+
+ /*
* If no arguments are specified and this is MAN_SCOPED (i.e.,
* next-line scoped), then set our mode to indicate that we're
* waiting for terms to load into our context.