]> git.cameronkatri.com Git - mandoc.git/commitdiff
Do not increment .Bl -enum list markers beyond two digits.
authorIngo Schwarze <schwarze@openbsd.org>
Wed, 8 Mar 2017 17:40:55 +0000 (17:40 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Wed, 8 Mar 2017 17:40:55 +0000 (17:40 +0000)
Otherwise, we would indent subsequent paragraphs less than
the CommonMark specification requires, harming portability.

mdoc_markdown.c

index 36b9605bbee4766405217da95dcdf98962f8ccca..3e29c5c84dd02da7933118fb297ffc99fa055c2a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_markdown.c,v 1.10 2017/03/08 15:08:36 schwarze Exp $ */
+/*     $Id: mdoc_markdown.c,v 1.11 2017/03/08 17:40:55 schwarze Exp $ */
 /*
  * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
  *
@@ -1178,7 +1178,9 @@ md_pre_It(struct roff_node *n)
                        break;
                case LIST_enum:
                        md_preword();
-                       printf("%d.\t", ++bln->norm->Bl.count);
+                       if (bln->norm->Bl.count < 99)
+                               bln->norm->Bl.count++;
+                       printf("%d.\t", bln->norm->Bl.count);
                        escflags &= ~ESC_FON;
                        break;
                case LIST_column: