diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-08 18:17:07 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-08 18:17:07 +0000 |
commit | 1e9000cfb16cb3a4dc80f8f94e19f27c1a49eea7 (patch) | |
tree | 0fbcd223484e2739113bafb9f79e4b11206df621 | |
parent | f2dfe933894f8906f3b221a002db942ac5897ea2 (diff) |
According to the CommonMark specification, backslash escapes
and markdown markup do not work inside code spans.
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Er/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Li/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Tn/font.out_markdown | 2 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_markdown.c | 6 |
6 files changed, 10 insertions, 6 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown index f4104d1e43c..b3351e327c1 100644 --- a/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown @@ -11,6 +11,6 @@ The macro. And with -`some *embedded* string`. +`some embedded string`. OpenBSD - October 21, 2011 diff --git a/regress/usr.bin/mandoc/mdoc/Er/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Er/font.out_markdown index f792b749544..a901f593218 100644 --- a/regress/usr.bin/mandoc/mdoc/Er/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Er/font.out_markdown @@ -7,7 +7,7 @@ ER-FONT(1) - General Commands Manual # DESCRIPTION normal text -`EFONT*emphasis*EBACK` +`EFONTemphasisEBACK` trailing text OpenBSD - July 9, 2012 diff --git a/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown index 99d33cdf588..491c932940f 100644 --- a/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown @@ -11,6 +11,6 @@ The variable. And with -`some *embedded* string`. +`some embedded string`. OpenBSD - October 21, 2011 diff --git a/regress/usr.bin/mandoc/mdoc/Li/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Li/font.out_markdown index d0ce39d0c24..b1b91c608d1 100644 --- a/regress/usr.bin/mandoc/mdoc/Li/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Li/font.out_markdown @@ -7,7 +7,7 @@ LI-FONT(1) - General Commands Manual # DESCRIPTION normal text -`literal*emphasis*back` +`literalemphasisback` trailing text OpenBSD - July 9, 2012 diff --git a/regress/usr.bin/mandoc/mdoc/Tn/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Tn/font.out_markdown index d84b4618468..00a0272129c 100644 --- a/regress/usr.bin/mandoc/mdoc/Tn/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Tn/font.out_markdown @@ -7,7 +7,7 @@ TN-FONT(1) - General Commands Manual # DESCRIPTION normal text -`literal*emphasis*back` +`literalemphasisback` trailing text OpenBSD - July 9, 2012 diff --git a/usr.bin/mandoc/mdoc_markdown.c b/usr.bin/mandoc/mdoc_markdown.c index 3b4774542f2..0212258b7e7 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.12 2017/03/08 17:51:29 schwarze Exp $ */ +/* $OpenBSD: mdoc_markdown.c,v 1.13 2017/03/08 18:17:06 schwarze Exp $ */ /* * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> * @@ -706,6 +706,8 @@ md_pre_raw(struct roff_node *n) if ((prefix = md_acts[n->tok].prefix) != NULL) { md_rawword(prefix); outflags &= ~MD_spc; + if (*prefix == '`') + code_blocks++; } return 1; } @@ -718,6 +720,8 @@ md_post_raw(struct roff_node *n) if ((suffix = md_acts[n->tok].suffix) != NULL) { outflags &= ~(MD_spc | MD_nl); md_rawword(suffix); + if (*suffix == '`') + code_blocks--; } } |