]> git.cameronkatri.com Git - mandoc.git/commitdiff
.Bl -column never gets blank lines between rows
authorIngo Schwarze <schwarze@openbsd.org>
Wed, 8 Mar 2017 15:08:36 +0000 (15:08 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Wed, 8 Mar 2017 15:08:36 +0000 (15:08 +0000)
mdoc_markdown.c
regress/mdoc/Bl/Makefile
regress/mdoc/Bl/colNoIt.out_markdown [new file with mode: 0644]
regress/mdoc/Bl/column.out_markdown [new file with mode: 0644]

index 04eda6a81ce83cd37b899a2fa70470cbc07b7608..36b9605bbee4766405217da95dcdf98962f8ccca 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_markdown.c,v 1.9 2017/03/08 14:30:06 schwarze Exp $ */
+/*     $Id: mdoc_markdown.c,v 1.10 2017/03/08 15:08:36 schwarze Exp $ */
 /*
  * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
  *
@@ -1151,7 +1151,8 @@ md_pre_It(struct roff_node *n)
 
        case ROFFT_HEAD:
                bln = n->parent->parent;
-               if (bln->norm->Bl.comp == 0)
+               if (bln->norm->Bl.comp == 0 &&
+                   bln->norm->Bl.type != LIST_column)
                        outflags |= MD_sp;
                outflags |= MD_nl;
 
@@ -1180,6 +1181,9 @@ md_pre_It(struct roff_node *n)
                        printf("%d.\t", ++bln->norm->Bl.count);
                        escflags &= ~ESC_FON;
                        break;
+               case LIST_column:
+                       outflags |= MD_br;
+                       return 0;
                default:
                        return 0;
                }
index 45b1e113043c1f8f3db1540659608763fbc476b4..0c2114cb088bc33743b6644a37fc8b8b609f29c7 100644 (file)
@@ -14,7 +14,7 @@ LINT_TARGETS  += empty noIt emptyhead emptytag emptyitem
 LINT_TARGETS   += bareIt bareTa break breakingIt broken
 
 MARKDOWN_TARGETS  = item inset diag ohang bullet dash enum hang tag
-MARKDOWN_TARGETS += extend nested offset secstart
+MARKDOWN_TARGETS += column colNoIt extend nested offset secstart
 MARKDOWN_TARGETS += notype multitype badargs
 MARKDOWN_TARGETS += empty noIt emptyhead emptytag emptyitem multitag
 MARKDOWN_TARGETS += bareIt bareTa unclosed breakingIt breakingTa broken
diff --git a/regress/mdoc/Bl/colNoIt.out_markdown b/regress/mdoc/Bl/colNoIt.out_markdown
new file mode 100644 (file)
index 0000000..d7c9004
--- /dev/null
@@ -0,0 +1,15 @@
+BL-COLNOIT(1) - General Commands Manual
+
+# NAME
+
+**Bl-colNoIt** - column lists without item macros
+
+# DESCRIPTION
+
+       **a** b  
+       *c*  d
+
+       a    b  
+       c    d
+
+OpenBSD - August 20, 2016
diff --git a/regress/mdoc/Bl/column.out_markdown b/regress/mdoc/Bl/column.out_markdown
new file mode 100644 (file)
index 0000000..c79a98d
--- /dev/null
@@ -0,0 +1,78 @@
+BL-COLUMN(1) - General Commands Manual
+
+# NAME
+
+**Bl-column** - lists with multiple columns
+
+# DESCRIPTION
+
+       a
+
+       a    b
+
+       a    b    cc  
+       a    b    cc  
+       a    b    cc  
+       a    b    cc  
+       a    b    cc
+
+       a    b    cc    d
+
+       a   b   cc   d   e
+
+       5 + 35 + 4 + 34 = 78:
+
+       x35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    x34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  
+       a                                      b
+
+       5 + (22+4)*2 + 21 = 78:
+
+       x22xxxxxxxxxxxxxxxxxxx    x22xxxxxxxxxxxxxxxxxxx    x21xxxxxxxxxxxxxxxxxx  
+       a                         b                         c
+
+       5 + 16 + (4+15)*3 = 78:
+
+       x16xxxxxxxxxxxxx    x15xxxxxxxxxxxx    x15xxxxxxxxxxxx    x15xxxxxxxxxxxx  
+       a                   b                  c                  d
+
+       5 + 13 + (3+12)*4 = 78:
+
+       x13xxxxxxxxxx   x12xxxxxxxxx   x12xxxxxxxxx   x12xxxxxxxxx   x12xxxxxxxxx  
+       a               b              c              d              e
+
+       a       b  
+       a       b  
+       a       b  
+       a       b  
+       a       b  
+       a       b
+
+       a  
+       a    b  
+       a    b    c  
+       a    b    c d  
+       a    b    c d e
+
+       a    b    c    d  
+       a    b    c    d  
+       a    b    c    d  
+       a    b    c    d  
+       a    b    c    d  
+       a    b    c    d  
+       a    b    c    d  
+       a    b    c    d
+
+       aa    OpenBSD OpenBSD OpenBSD    tab-tab  
+       aa    OpenBSD OpenBSD Ox         tab-ta  
+       aa    Ox OpenBSD OpenBSD         ta-tab  
+       aa    Ox OpenBSD Ox              ta-ta  
+       aa    Ox OpenBSD OpenBSD         ta-bl/ta  
+       aa     OpenBSD OpenBSD Ox        ta/bl-ta  
+       aa     OpenBSD OpenBSD OpenBSD   ta/bl-bl/ta  
+       aa    bb                         ta at eol  
+       aa    bb                         
+       tab at eol
+
+       aa    bb    cc    dd
+
+OpenBSD - October 14, 2015