From ab5a9a1881b1ab2422deff11642a442c897fa8d3 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 22 Dec 2013 13:25:17 +0000 Subject: Implement end-of-sentence spacing at the end of man(7) macro lines. Patch from Franco Fichtner (DragonFly). --- man_macro.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'man_macro.c') diff --git a/man_macro.c b/man_macro.c index 64597269..16d68d92 100644 --- a/man_macro.c +++ b/man_macro.c @@ -431,6 +431,15 @@ in_line_eoln(MACRO_PROT_ARGS) return(0); } + /* + * 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 -- cgit