summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc.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/mdoc.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/mdoc.c')
-rw-r--r--usr.bin/mandoc/mdoc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c
index 7368dedca61..ee77219710c 100644
--- a/usr.bin/mandoc/mdoc.c
+++ b/usr.bin/mandoc/mdoc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc.c,v 1.116 2014/10/20 02:31:44 schwarze Exp $ */
+/* $OpenBSD: mdoc.c,v 1.117 2014/10/20 15:49:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -236,7 +236,8 @@ int
mdoc_parseln(struct mdoc *mdoc, int ln, char *buf, int offs)
{
- mdoc->flags |= MDOC_NEWLINE;
+ if (mdoc->last->type != MDOC_EQN || ln > mdoc->last->line)
+ mdoc->flags |= MDOC_NEWLINE;
/*
* Let the roff nS register switch SYNOPSIS mode early,