From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: According to the CommonMark specification, backslash escapes
Date: Wed, 8 Mar 2017 13:17:57 -0500 (EST) [thread overview]
Message-ID: <6258356208053897962.enqueue@fantadrom.bsd.lv> (raw)
Log Message:
-----------
According to the CommonMark specification, backslash escapes
and markdown markup do not work inside code spans.
Modified Files:
--------------
mdocml:
mdoc_markdown.c
mdocml/regress/mdoc/Dv:
font.out_markdown
mdocml/regress/mdoc/Er:
font.out_markdown
mdocml/regress/mdoc/Ev:
font.out_markdown
mdocml/regress/mdoc/Li:
font.out_markdown
mdocml/regress/mdoc/Tn:
font.out_markdown
Revision Data
-------------
Index: font.out_markdown
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/Li/font.out_markdown,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/mdoc/Li/font.out_markdown -Lregress/mdoc/Li/font.out_markdown -u -p -r1.1 -r1.2
--- regress/mdoc/Li/font.out_markdown
+++ 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
Index: mdoc_markdown.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_markdown.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lmdoc_markdown.c -Lmdoc_markdown.c -u -p -r1.12 -r1.13
--- mdoc_markdown.c
+++ 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--;
}
}
Index: font.out_markdown
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/Dv/font.out_markdown,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/mdoc/Dv/font.out_markdown -Lregress/mdoc/Dv/font.out_markdown -u -p -r1.1 -r1.2
--- regress/mdoc/Dv/font.out_markdown
+++ regress/mdoc/Dv/font.out_markdown
@@ -11,6 +11,6 @@ The
macro.
And with
-`some *embedded* string`.
+`some embedded string`.
OpenBSD - October 21, 2011
Index: font.out_markdown
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/Ev/font.out_markdown,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/mdoc/Ev/font.out_markdown -Lregress/mdoc/Ev/font.out_markdown -u -p -r1.1 -r1.2
--- regress/mdoc/Ev/font.out_markdown
+++ regress/mdoc/Ev/font.out_markdown
@@ -11,6 +11,6 @@ The
variable.
And with
-`some *embedded* string`.
+`some embedded string`.
OpenBSD - October 21, 2011
Index: font.out_markdown
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/Er/font.out_markdown,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/mdoc/Er/font.out_markdown -Lregress/mdoc/Er/font.out_markdown -u -p -r1.1 -r1.2
--- regress/mdoc/Er/font.out_markdown
+++ 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
Index: font.out_markdown
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/Tn/font.out_markdown,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/mdoc/Tn/font.out_markdown -Lregress/mdoc/Tn/font.out_markdown -u -p -r1.1 -r1.2
--- regress/mdoc/Tn/font.out_markdown
+++ 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
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2017-03-08 18:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6258356208053897962.enqueue@fantadrom.bsd.lv \
--to=schwarze@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).