summaryrefslogtreecommitdiffstats
path: root/mdoc_markdown.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-03-08 17:40:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-03-08 17:40:55 +0000
commit09b6a04ee943fa16b286b912d09f78a3f480c773 (patch)
treec5c30fa24924a844769188e6c16b22ee923af98e /mdoc_markdown.c
parentc7cdd55bb559416cae073ca081f73da0635e0a0c (diff)
downloadmandoc-09b6a04ee943fa16b286b912d09f78a3f480c773.tar.gz
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 'mdoc_markdown.c')
-rw-r--r--mdoc_markdown.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mdoc_markdown.c b/mdoc_markdown.c
index ff797bfd..cb28ee1e 100644
--- a/mdoc_markdown.c
+++ b/mdoc_markdown.c
@@ -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: