]> git.cameronkatri.com Git - mandoc.git/blobdiff - mdoc_man.c
1) Remove documentation of the groff-1.15 compatibility quirk
[mandoc.git] / mdoc_man.c
index c438f870afc84166c6a54610344a036c58cc68a8..7def0df88ca008d8160ebeecda670293985fb381 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_man.c,v 1.38 2012/07/13 23:57:58 schwarze Exp $ */
+/*     $Id: mdoc_man.c,v 1.41 2012/07/16 10:45:41 schwarze Exp $ */
 /*
  * Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
  *
@@ -1116,7 +1116,8 @@ pre_it(DECL_ARGS)
                outflags |= MMAN_PP | MMAN_nl;
                bln = n->parent->parent;
                if (0 == bln->norm->Bl.comp ||
-                   NULL == bln->parent->prev)
+                   (NULL == n->parent->prev &&
+                    NULL == bln->parent->prev))
                        outflags |= MMAN_sp;
                outflags &= ~MMAN_br;
                switch (bln->norm->Bl.type) {
@@ -1341,7 +1342,11 @@ static int
 pre_sp(DECL_ARGS)
 {
 
-       print_line(".sp", MMAN_nl);
+       if (MMAN_PP & outflags) {
+               outflags &= ~MMAN_PP;
+               print_line(".PP", 0);
+       } else
+               print_line(".sp", 0);
        return(1);
 }