- Add note clarifying that not every feature of HTML examples is normative
- Move "Backslash escapes" and "Character references" to "Preliminaries"
(#600). It was confusing having them in the "Inline" section, since
they also affect some block contexts (e.g. reference link definitions).
- Clarify wording in spec for character groups (#618, Titus Wormer, with
Johel Ernesto Guerror Peña).
- Remove line tabulation, form feed from whitespace
- Rename newline to line feed or line ending
- Reword spec to be more explicit about whitespace
- Reword description of line breaks
- Link unicode punctuation
- Clarify link whitespace by describing "link information"
- Clarify link destination and title
- Add definition of ASCII control characters (#603, Titus Wormer).
- Fix wording in start condition of type 7 HTML (#665, Titus Wormer).
textareato list of literal HTML block tags (#657).
textareablocks can contain
blank lines without the contents being interpret as commonmark.
textareato more cases (#667, Titus Wormer).
- Remove superfluous restrictions on declarations (#620, Titus Wormer).
HTML declarations need not be limited to all capital ASCII letters.
- Add inline link examples with empty link text (#636, jsteuer).
- Remove outdated restriction on list item (#627, Johel Ernesto Guerrero
Peña). This is a holdover from the days when two blank lines
broke out of a list.
- Add example with unbalanced parens in link destination.
- Clarify that new blocks are added to container blocks. (#598, Jay
- Clarify language for backtick code spans (#589, Johel Ernesto Guerrero
- Fix link text grouping sample (#584, Ashe Connor, Johel Ernesto
- Fix misleading text for full reference link (#581). There is no
"first link label" here, just a link text.
- Use better example to test unicode case fold for reference links (#582).
The earlier test could be passed by implementations that just uppercase.
- Test new entity length constraints (#575, Miha Zupan).
- normalize.py: replace cgi.escape with html.escape (#656,
- Fix unqualified calls to node_append_child.
- Remove extraneous href attribute on headings (#625, Christoph Päper).
- Properly handle cross-refs (#578). Previously it broke in a few cases,
e.g. with soft breaks.
- Use unsafe mode so HTML isn't filtered out.
- Changes for compatibility with lua 5.3's new number type.
- CSS and HTML improvements in HTML version of spec
(#639, #641, 642, Andrei Korzhyts).
- Revise emphasis parsing algorithm description in light of
- Add documentation of the npm package to README.md (thanks to
- Fix anchor definition for 'end condition'.
- Remove duplicate example (#660, Titus Wormer).
- Remove duplicate links in spec (#655, Levi Gruspe).
- Various typo fixes (#632, Scott Abbey; #623, Anthony Fok; #601, #617, #659,
Clarify that entities can't be used to indicate structure (#474). For example, you can't use
*for a bullet list, or
to create a new paragraph.
Limit numerical entities to 6 hex or 7 decimal digits (#487). This is all that is needed given the upper bound on unicode code points.
Specify dropping of initial/final whitespace in setext heading content (#461).
Add example with a reference link definition where the reference is never used (#454).
Add example with setext header after reference link defs (#395).
Clarify that script, pre, style close tags can begin an HTML block (#517).
Disallow newlines inside of unquoted attributes (#507, Shyouhei Urabe) as per HTML spec: https://html.spec.whatwg.org/multipage/syntax.html#unquoted.
Remove vestigial restriction in list item spec (#543). The "not separated by more than one blank line" was a left-over from an earlier version of the spec in which two blank lines ended a list.
Fix tests where list items are indented 4+ spaces (#497). The tests did not accord with the spec here; these lines should be continuation lines (if no blank space) or indented code blocks (if blank space).
Clarify tildes and backticks in info strings (#119). We disallow backticks in info strings after backtick fences only. Both backticks and tildes are allowed in info strings after tilde fences. Add example.
Don't strip spaces in code span containing only spaces (#569). This allows one to include a code span with just spaces, using the most obvious syntax.
Add example w/ reference link w/ empty destination in
Disallow link destination beginning with
<unless it is inside
<..>(#538). This brings the description in line with the spec example:
[foo] . <p>[foo]: <bar>(baz)</p> <p>[foo]</p>
Allow spaces inside link destinations in pointy brackets (#503). This reverts a change in 0.24 and should make things easier for people working with image paths containing spaces.
Remove redundant condition. We don't need to specify that the absolute URI in an autolink doesn't contain
<, since this is specified in the description of an absolute URI.
Add additional spec examples involving link destinations in
Add test for
(in parenthesized link titles (#526).
Add example showing need for space before title in reference link (#469).
Add codepoints for punctuation characters (#564, Christoph Päper).
Clarify the left- and right-flanking definitions (#534, Jay Martin).
Match interior delimiter runs if lengths of both are multiples of 3 (#528). This gives better results on
a***b***cwithout giving bad results on the cases that motivated the original multiple of 3 rule.
Add another test case for emphasis (#509, Michael Howell).
Code spans: don't collapse interior space (#532).
Simplify revisions to code span normalization rules. Remove the complex rule about ignoring newlines adjacent to spaces. Now newlines are simply converted to spaces.
Replace image 'url' with 'destination' (#512, Phill).
Add some links for occurrences of "above" (#480).
Create .gitattributes so that changelog.txt is highlighted as markdown (#499, Christoph Päper).
Update GitHub links (Morten Piibeleht).
Update references to container and leaf block headers to use the correct pluralization (#531, Elijah Hamovitz).
Improve documentation of parsing strategy (#563). Note that
openers_bottomneeds to be indexed to delimiter run lengths as well as types.
make_spec.lua: Fix migration of children nodes in create_anchors (#536, Zhiming Wang). This resulted in some bugs in the rendered spec (where words would be dropped from links).
Fix dingus link when double clicking Markdown code (#535, Zhiming Wang). Prior to this commit, the link opened is always
Add spec.json generator to Makefile (M Pacer).
Allow unlimited balanced pairs of parentheses in link URLs
(@kivikakk, commonmark/cmark#166). The rationale is that there are many URLs
containing unescaped nested parentheses. Note that
implementations are allowed to impose limits on parentheses
nesting for performance reasons, but at least three levels
of nesting should be supported.
Change Rule 14 for Emphasis. Previously the nesting
Strong (Emph (...)) was preferred over Emph (Strong (...)).
This change makes Emph (Strong (...)) preferred.
Note that the commonmark reference implementations
were not entirely consistent about this rule, giving
different results for
This change simplifies parsing. It goes against the majority
of implementations, but only on something utterly trivial.
Clarify definition of delimiter runs (Aidan Woods, #485).
Clarify precedence of thematic breaks over list items
in the list spec, not just the thematic break spec (Aidan Woods).
Clarify definition of link labels and normalization
procedure (Matthias Geier, #479).
Clarify that the end of an HTML block is determined by its
start, and is not changed by HTML tags encountered inside
the block. Give an example of a case where a block ends
before an interior element has been closed (Yuki Izumi, #459).
In the future we might consider changing the spec to handle
this case more intuitively; this change just documents more
explicitly what the spec requires.
Acknowledge Aaron Swartz's role in developing Markdown.
Remove misleading backslash in example for disabling image markup
Fix Unicode terminology (general category, not class)
(Philipp Matthias Schaefer).
Add another illustrative case for code spans (#463).
Remove possibly misleading 'either's (#467).
Fix typo (Aidan Woods).
Clarify that some blocks can contain code spans (Matthias Geier).
Fix typo and clarified tab expansion rule (Scott Abbey).
Add a missing "iff" (Matthias Geier).
Add release checklist.
Added npm package for spec (Vitaly Puzrin).
Remove SPEC variable from Makefile.
Empty list items can no longer interrupt a paragraph.
This removes an ambiguity between setext headers and
lists in cases like
Removed the "two blank lines breaks out of lists" rule.
This is incompatible with the principle of uniformity
(and indeed with the spec for list items, which requires
that the meaning of a chunk of lines not change when it
is put into a list item.)
Ordered list markers that interrupt a paragraph must start with 1.
Improved the section on tabs. Added some test cases for ATX
headers and thematic breaks. Clarified that it's not just cases
that affect indentation that matter, but all cases where whitespace
matters for block structure.
Removed example of ATX header with tab after
Allow HTML blocks to end on the last line of their container
(Colin O'Dell, #103).
Spec changes in strong/emph parsing. See
for motivation. This restores intuitive parsings for a number of cases.
The main change is to disallow strong or emph when one of
the delimiters is "internal" and the sum of the lengths of
the enclosing delimiter runs is a multiple of 3. Thus,
<em><em>foo</em>bar</em>**as before. Thanks to Fletcher Penney
Add tests to check that markdown parsing is working fine after an HTML
block end tag (Alexandre Mutel).
Add test case for nested lists with an indent > 4 (Alexandre Mutel).
Cleaned up terminology around lazy continuation lines. Added some links.
Fixed broken links and typos (Artyom, Matthias Geier, Sam Estep).
<in list item spec for clarity.
Add point about readibility to "What is Markdown" section.
Add example for list item starting with a blank line with spaces
Make interact more button-like and clearer (Jeff Atwood).
spec_tests.py: exit code is now sum of failures and errors.
spec_tests.py: specify newline when opening file.
- Added several more tab-handling cases (see commonmark/cmark#101).
- Fixed spec test for tabs. In the blockquote with a tab following
>, only one space should be consumed, yielding two spaces
at the beginning of the content.
- Update license year range to 2016 (Prayag Verma).
- Fixed typo: setext heading line -> setext heading underline (#389).
- Fixed date 2015->2016 (#388)
New format for spec tests, new lua formatter for specs.
The format for the spec examples has changed from
. markdown . html .
```````````````````````````````` example markdown . html ````````````````````````````````
One advantage of this is that
spec.txtbecomes a valid
tests/spec_test.pyto use the new format.
tools/makespec.pywith a lua script,
which uses the
lcmarkrock (and indirectly libcmark). It can
generate HTML, LaTeX, and CommonMark versions of the spec. Pandoc
is no longer needed for the latex/PDF version. And, since the new
program uses the cmark API and operates directly on the parse tree,
we get much more reliable translations than we got with the old
Python script (#387).
Remove whitelist of valid schemes. Now a scheme is any sequence
of 2-32 characters, beginning with an ASCII letter, and containing
only ASCII letters, digits, and the symbols
Discussion at http://talk.commonmark.org/t/555.
Added an example: URI schemes must be more than one character.
Modify setext heading spec to allow multiline headings.
Foo bar --- baz
is now interpreted as heading + paragraph, rather than
paragraph + thematic break + paragraph.
Call U+FFFD the REPLACEMENT CHARACTER, not the "unknown code
Change misleading undefined entity name example.
Remove misleading claim about entity references in raw HTML
(a regression in 0.23). Entity references are not treated
as literal text in raw HTML; they are just passed through.
Don't allow space between link text and link label in a
reference link. This fixes the problem of inadvertent capture:
[foo] [bar] [foo]: /u1 [bar]: /u2
Rename "horizontal rule" -> "thematic break". This matches the HTML5
meaning for the hr element, and recognizes that the element may be
rendered in various ways (not always as a horizontal rule).
Rename "header" -> "heading". This avoids a confusion that might arise
now that HTML5 has a "header" element, distinct from the "headings"
h1, h2, ... Our headings correspond to HTML5 headings, not HTML5 headers.
The terminology of 'headings' is more natural, too.
ATX headers: clarify that a space (or EOL) is needed; other whitespace
won't do (#373). Added a test case.
Rewrote "Entities" section with more correct terminology (#375).
Entity references and numeric character references.
Clarified that spec does not dictate URL encoding/normalization policy.
New test case: list item code block with empty line (Craig M.
Added example with escaped backslash at end of link label (#325).
Shortened an example so it doesn't wrap (#371).
Fixed duplicate id "attribute".
Fix four link targets (Lucas Werkmeister).
Fix typo for link to "attributes" (Robin Stocker).
Fix "delimiter" spellings and links (Sam Rawlins).
Consistent usage of "we" instead of "I" (renzo).
CommonMark.dtd - Rename
html_inlinefor consistency. (Otherwise it is too
hard to remember whether
htmlis block or inline, a source of
CommonMark.dtd - added
xmlnsattribute to document.
CommonMark.dtd - added
CommonMark.dtd - renamed
Fixed some HTML inline tests, which were actually HTML blocks, given
the changes to block parsing rules since these examples were written
Normalize URLs when comparing test output. This way we don't fail
tests for legitimate variations in URL escaping/normalization policies
normalize.py: don't use
HTMLParseError, which has been removed
as of python 3.5 (#380).
Minor spacing adjustments in test output, to match cmark's output,
since we test cmark without normalization.
makespec.py: remove need for link anchors to be on one line.
makespec.py: Only do two levels in the TOC.
display:inline-blockrather than floats for side-by-side.
This works when printed too.
Added better print CSS.