parent
d99afb5a46
commit
1db08eacc1
@ -1,7 +1,7 @@
|
||||
---
|
||||
title: CommonMark Spec
|
||||
author: John MacFarlane
|
||||
version: '0.30'
|
||||
version: 0.30
|
||||
date: '2021-06-19'
|
||||
license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
|
||||
...
|
||||
@ -114,7 +114,7 @@ questions it does not answer:
|
||||
not require that. This is hardly a "corner case," and divergences
|
||||
between implementations on this issue often lead to surprises for
|
||||
users in real documents. (See [this comment by John
|
||||
Gruber](https://web.archive.org/web/20170611172104/http://article.gmane.org/gmane.text.markdown.general/1997).)
|
||||
Gruber](http://article.gmane.org/gmane.text.markdown.general/1997).)
|
||||
|
||||
2. Is a blank line needed before a block quote or heading?
|
||||
Most implementations do not require the blank line. However,
|
||||
@ -122,7 +122,7 @@ questions it does not answer:
|
||||
also to ambiguities in parsing (note that some implementations
|
||||
put the heading inside the blockquote, while others do not).
|
||||
(John Gruber has also spoken [in favor of requiring the blank
|
||||
lines](https://web.archive.org/web/20170611172104/http://article.gmane.org/gmane.text.markdown.general/2146).)
|
||||
lines](http://article.gmane.org/gmane.text.markdown.general/2146).)
|
||||
|
||||
3. Is a blank line needed before an indented code block?
|
||||
(`Markdown.pl` requires it, but this is not mentioned in the
|
||||
@ -155,7 +155,7 @@ questions it does not answer:
|
||||
```
|
||||
|
||||
(There are some relevant comments by John Gruber
|
||||
[here](https://web.archive.org/web/20170611172104/http://article.gmane.org/gmane.text.markdown.general/2554).)
|
||||
[here](http://article.gmane.org/gmane.text.markdown.general/2554).)
|
||||
|
||||
5. Can list markers be indented? Can ordered list markers be right-aligned?
|
||||
|
||||
@ -1330,7 +1330,10 @@ interpretable as a [code fence], [ATX heading][ATX headings],
|
||||
|
||||
A [setext heading underline](@) is a sequence of
|
||||
`=` characters or a sequence of `-` characters, with no more than 3
|
||||
spaces of indentation and any number of trailing spaces or tabs.
|
||||
spaces of indentation and any number of trailing spaces or tabs. If a line
|
||||
containing a single `-` can be interpreted as an
|
||||
empty [list items], it should be interpreted this way
|
||||
and not as a [setext heading underline].
|
||||
|
||||
The heading is a level 1 heading if `=` characters are used in
|
||||
the [setext heading underline], and a level 2 heading if `-`
|
||||
@ -1964,7 +1967,7 @@ has been found, the code block contains all of the lines after the
|
||||
opening code fence until the end of the containing block (or
|
||||
document). (An alternative spec would require backtracking in the
|
||||
event that a closing code fence is not found. But this makes parsing
|
||||
much less efficient, and there seems to be no real downside to the
|
||||
much less efficient, and there seems to be no real down side to the
|
||||
behavior described here.)
|
||||
|
||||
A fenced code block may interrupt a paragraph, and does not require
|
||||
@ -2394,7 +2397,7 @@ followed by an ASCII letter.\
|
||||
`<![CDATA[`.\
|
||||
**End condition:** line contains the string `]]>`.
|
||||
|
||||
6. **Start condition:** line begins with the string `<` or `</`
|
||||
6. **Start condition:** line begins the string `<` or `</`
|
||||
followed by one of the strings (case-insensitive) `address`,
|
||||
`article`, `aside`, `base`, `basefont`, `blockquote`, `body`,
|
||||
`caption`, `center`, `col`, `colgroup`, `dd`, `details`, `dialog`,
|
||||
@ -2403,7 +2406,7 @@ followed by one of the strings (case-insensitive) `address`,
|
||||
`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`,
|
||||
`html`, `iframe`, `legend`, `li`, `link`, `main`, `menu`, `menuitem`,
|
||||
`nav`, `noframes`, `ol`, `optgroup`, `option`, `p`, `param`,
|
||||
`section`, `summary`, `table`, `tbody`, `td`,
|
||||
`section`, `source`, `summary`, `table`, `tbody`, `td`,
|
||||
`tfoot`, `th`, `thead`, `title`, `tr`, `track`, `ul`, followed
|
||||
by a space, a tab, the end of the line, the string `>`, or
|
||||
the string `/>`.\
|
||||
@ -5354,7 +5357,7 @@ well. ([reStructuredText](http://docutils.sourceforge.net/rst.html)
|
||||
takes a different approach, requiring blank lines before lists
|
||||
even inside other list items.)
|
||||
|
||||
In order to solve the problem of unwanted lists in paragraphs with
|
||||
In order to solve of unwanted lists in paragraphs with
|
||||
hard-wrapped numerals, we allow only lists starting with `1` to
|
||||
interrupt paragraphs. Thus,
|
||||
|
||||
@ -8603,7 +8606,7 @@ My ![foo bar](/path/to/train.jpg "title" )
|
||||
```````````````````````````````` example
|
||||
![](/url)
|
||||
.
|
||||
<p><img src="/url" /></p>
|
||||
<p><img src="/url" alt="" /></p>
|
||||
````````````````````````````````
|
||||
|
||||
|
||||
@ -8751,7 +8754,7 @@ a link to the URI, with the URI as the link's label.
|
||||
|
||||
An [absolute URI](@),
|
||||
for these purposes, consists of a [scheme] followed by a colon (`:`)
|
||||
followed by zero or more characters other than [ASCII control
|
||||
followed by zero or more characters other [ASCII control
|
||||
characters][ASCII control character], [space], `<`, and `>`.
|
||||
If the URI includes these characters, they must be percent-encoded
|
||||
(e.g. `%20` for a space).
|
||||
|
Loading…
Reference in New Issue
Block a user