summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-10-20 15:49:45 +0000
committerschwarze <schwarze@openbsd.org>2014-10-20 15:49:45 +0000
commit7c46d8a6f75a1304ddc3e4e6645e2d28da9ce989 (patch)
tree901d84c6cf1f2a6a04ecd6d76e51df70867d4762 /usr.bin/mandoc/man.c
parentcorrectly parse spacing around in-line equations (diff)
downloadwireguard-openbsd-7c46d8a6f75a1304ddc3e4e6645e2d28da9ce989.tar.xz
wireguard-openbsd-7c46d8a6f75a1304ddc3e4e6645e2d28da9ce989.zip
correct the spacing after in-line equations
that start at the beginning of an input line but end before the end of an input line
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r--usr.bin/mandoc/man.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c
index 5293d8f3517..87f0310c5d1 100644
--- a/usr.bin/mandoc/man.c
+++ b/usr.bin/mandoc/man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man.c,v 1.88 2014/10/20 02:31:44 schwarze Exp $ */
+/* $OpenBSD: man.c,v 1.89 2014/10/20 15:49:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -117,7 +117,8 @@ int
man_parseln(struct man *man, int ln, char *buf, int offs)
{
- man->flags |= MAN_NEWLINE;
+ if (man->last->type != MAN_EQN || ln > man->last->line)
+ man->flags |= MAN_NEWLINE;
return (roff_getcontrol(man->roff, buf, &offs) ?
man_pmacro(man, ln, buf, offs) :