summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-03-08 17:40:18 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-03-08 17:40:18 +0000
commit969313afbffdabbba7c75843ad41205373b2baac (patch)
tree7e4ae7a23be4cb164293a0ae0581bde6008d834c /usr.bin
parent1e1e4c9f4a8f8adebc292ce52a2fc7672dda29d0 (diff)
Do not increment .Bl -enum list markers beyond two digits.
Otherwise, we would indent subsequent paragraphs less than the CommonMark specification requires, harming portability.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/mdoc_markdown.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_markdown.c b/usr.bin/mandoc/mdoc_markdown.c
index fe3ad00e718..4951be2de3b 100644
--- a/usr.bin/mandoc/mdoc_markdown.c
+++ b/usr.bin/mandoc/mdoc_markdown.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_markdown.c,v 1.10 2017/03/08 15:08:17 schwarze Exp $ */
+/* $OpenBSD: mdoc_markdown.c,v 1.11 2017/03/08 17:40:17 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: