summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-03-08 17:40:17 +0000
committerschwarze <schwarze@openbsd.org>2017-03-08 17:40:17 +0000
commitb60e0d1609bca8a8c44a5a7c4ab494363bc92b7d (patch)
tree88d3ad270ff2207eea81052416536b35ddd15356
parentStray #endif w/o comment. (diff)
downloadwireguard-openbsd-b60e0d1609bca8a8c44a5a7c4ab494363bc92b7d.tar.xz
wireguard-openbsd-b60e0d1609bca8a8c44a5a7c4ab494363bc92b7d.zip
Do not increment .Bl -enum list markers beyond two digits.
Otherwise, we would indent subsequent paragraphs less than the CommonMark specification requires, harming portability.
-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: