| spec.txt | spec.txt | |||
|---|---|---|---|---|
| --- | --- | |||
| 标题: CommonMark 规范 | 标题: CommonMark 规范 | |||
| 作者 | 作者 | |||
| - John MacFarlane | - John MacFarlane | |||
| version: 0.11 | version: 0.12 | |||
| date: 2014-11-10 | date: 2014-11-10 | |||
| ... | ... | |||
| # 引言 | # 引言 | |||
| ## 什么是 Markdown? | ## 什么是 Markdown? | |||
| Markdown 是一种用于编写结构化文档的纯文本格式, | Markdown 是一种用于编写结构化文档的纯文本格式, | |||
| 基于在电子邮件和 usenet 帖子中用于表示格式的约定。 | 基于在电子邮件和 usenet 帖子中用于表示格式的约定。 | |||
| 它由 John Gruber 于 2004 年开发,他编写了 | 它由 John Gruber 于 2004 年开发,他编写了 | |||
| skipping to change at line 5088 | skipping to change at line 5088 | |||
| and title are given immediately after the link text. In [reference | and title are given immediately after the link text. In [reference | |||
| links](#reference-links) the destination and title are defined elsewhere | links](#reference-links) the destination and title are defined elsewhere | |||
| in the document. | in the document. | |||
| A [link text](@link-text) consists of a sequence of zero or more | A [link text](@link-text) consists of a sequence of zero or more | |||
| inline elements enclosed by square brackets (`[` and `]`). The | inline elements enclosed by square brackets (`[` and `]`). The | |||
| following rules apply | following rules apply | |||
| - Links may not contain other links, at any level of nesting. | - Links may not contain other links, at any level of nesting. | |||
| - Brackets are allowed in the link text only if (a) they are | - Brackets are allowed in the [link text](#link-text) only if (a) they | |||
| backslash-escaped or (b) they appear as a matched pair of brackets, | are backslash-escaped or (b) they appear as a matched pair of brackets, | |||
| with an open bracket `[`, a sequence of zero or more inlines, and | with an open bracket `[`, a sequence of zero or more inlines, and | |||
| a close bracket `]`. | a close bracket `]`. | |||
| - Backtick [code spans](#code-span), [autolinks](#autolink), and | - Backtick [code spans](#code-span), [autolinks](#autolink), and | |||
| raw [HTML tags](#html-tag) bind more tightly | raw [HTML tags](#html-tag) bind more tightly | |||
| than the brackets in link text. Thus, for example, | than the brackets in link text. Thus, for example, | |||
| `` [foo`]` `` could not be a link text, since the second `]` | `` [foo`]` `` could not be a link text, since the second `]` | |||
| is part of a code span. | is part of a code span. | |||
| - The brackets in link text bind more tightly than markers for | - The brackets in link text bind more tightly than markers for | |||
| skipping to change at line 5851 | skipping to change at line 5851 | |||
| <p>[foo]<a href="/url1">bar</a></p> | <p>[foo]<a href="/url1">bar</a></p> | |||
| . | . | |||
| ## Images | ## Images | |||
| Syntax for images is like the syntax for links, with one | Syntax for images is like the syntax for links, with one | |||
| difference. Instead of [link text](#link-text), we have an [image | difference. Instead of [link text](#link-text), we have an [image | |||
| description](@image-description). The rules for this are the | description](@image-description). The rules for this are the | |||
| same as for [link text](#link-text), except that (a) an | same as for [link text](#link-text), except that (a) an | |||
| image description starts with ` |  | |||
| . | . | |||
| <p><img src="/url" alt="foo" title="title" /></p> | <p><img src="/url" alt="foo" title="title" /></p> | |||
| . | . | |||
| . | . | |||
| ![foo *bar*] | ![foo *bar*] | |||
| [foo *bar*]: train.jpg "train & tracks" | [foo *bar*]: train.jpg "train & tracks" | |||
| . | . | |||
| <p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> | <p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> | |||
| . | . | |||
| . | . | |||
| ](/url2) | ](/url2) | |||
| . | . | |||
| <p></p> | <p><img src="/url2" alt="foo bar" /></p> | |||
| . | . | |||
| . | . | |||
| ](/url2) | ](/url2) | |||
| . | . | |||
| <p><img src="/url2" alt="foo bar" /></p> | <p><img src="/url2" alt="foo bar" /></p> | |||
| . | . | |||
| Though this spec is concerned with parsing, not rendering, it is | Though this spec is concerned with parsing, not rendering, it is | |||
| recommended that in rendering to HTML, only the plain string content | recommended that in rendering to HTML, only the plain string content | |||
| End of changes. 4 change blocks. | ||||
| 6 lines changed or deleted | 6 lines changed or added | |||
此 HTML 差异由 rfcdiff 1.41 生成。最新版本可从 http://tools.ietf.org/tools/rfcdiff/ 获取 | ||||