diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-08 18:17:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-08 18:17:21 +0000 |
commit | 42032384556d2357ac298bb781a623622def9b51 (patch) | |
tree | 1937be83d3abc5fb1bdf7938c54e01b9aaa31dad | |
parent | 7db6e5827c9c2a62f28455d8132ca4a12f9b8a52 (diff) | |
download | mandoc-42032384556d2357ac298bb781a623622def9b51.tar.gz |
According to the CommonMark specification, backslash escapes
and markdown markup do not work inside code spans.
-rw-r--r-- | mdoc_markdown.c | 4 | ||||
-rw-r--r-- | regress/mdoc/Dv/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/mdoc/Er/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/mdoc/Ev/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/mdoc/Li/font.out_markdown | 2 | ||||
-rw-r--r-- | regress/mdoc/Tn/font.out_markdown | 2 |
6 files changed, 9 insertions, 5 deletions
diff --git a/mdoc_markdown.c b/mdoc_markdown.c index aee11787..c9048a55 100644 --- a/mdoc_markdown.c +++ b/mdoc_markdown.c @@ -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--; } } diff --git a/regress/mdoc/Dv/font.out_markdown b/regress/mdoc/Dv/font.out_markdown index f4104d1e..b3351e32 100644 --- a/regress/mdoc/Dv/font.out_markdown +++ b/regress/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/mdoc/Er/font.out_markdown b/regress/mdoc/Er/font.out_markdown index f792b749..a901f593 100644 --- a/regress/mdoc/Er/font.out_markdown +++ b/regress/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/mdoc/Ev/font.out_markdown b/regress/mdoc/Ev/font.out_markdown index 99d33cdf..491c9329 100644 --- a/regress/mdoc/Ev/font.out_markdown +++ b/regress/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/mdoc/Li/font.out_markdown b/regress/mdoc/Li/font.out_markdown index d0ce39d0..b1b91c60 100644 --- a/regress/mdoc/Li/font.out_markdown +++ b/regress/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/mdoc/Tn/font.out_markdown b/regress/mdoc/Tn/font.out_markdown index d84b4618..00a02721 100644 --- a/regress/mdoc/Tn/font.out_markdown +++ b/regress/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 |