Releases: commonmark/commonmark-spec
CommonMark 0.21
- Changed handling of tabs. Instead of having a preprocessing step
where tabs are converted to spaces, we now handle tabs directly in
the parser. This allows tabs to be retained in code blocks and code
spans. This change adds some general language to the effect that,
for purposes of determining block structure, tabs are to be treated
just like equivalent spaces. - Completely rewrote spec for HTML blocks. The new spec provides
better handling of tags like<del>
, which can be either block
or inline level content, better handling of custom tags, and
better handling of verbatim contexts like<pre>
, comments,
and<script>
. - Added 9-digit limit on ordered list start number.
Some browsers use signed 32-bit integers for indexing
the items of an ordered list, and this can lead to odd
or undefined behavior if 10-digit start numbers are allowed. - Allow (non-initial) hyphens in tag names (#239). Custom
tags in HTML5 must contain hyphens. - Clarified that HTML block is closed at end of containing
block, not just end of the document (as with fenced code blocks.) - Specify nested link definition behavior in prose (Benjamin
Dumke-von der Ehe). - Added test for edge case in link reference parsing
(Benjamin Dumke-von der Ehe, see commonmark/commonmark.js#49). - Added link tests with fragment identifiers and queries (David
Green, #342). - Added test cases with a literal backslash in a link destination
(see commonmark/commonmark.js#45). - Added test for entity
≧̸
which resolves to two code points.
Put entity tests on several lines for readability (see
commonmark/commonmark.js#47). - Fixed broken "pre" literal HTML example. Contents
weren't escaped properly. - Simplified defn of "unicode whitespace character,"
rectifying omission of line tabulation, U+000B (#343). - Removed ambiguity in definition of "line" (#346).
- Rewrapped two prose lines so
+
does not begin a line (#347). - Added another test with overlapping emphasis markers.
- Fixed link to 'attributes'.
- Revised appendix, "A parsing strategy," and
added a description of emphasis/link parsing algorithm. spec_tests.py
- set options for conversions, set library
paths in a more cross-platform way.spec_tests.py
: force utf-8 on test failure output and
--dump-tests
(#344, #345).spec_tests.py
: Properly handle visible tab→
in expected output.normalize.py
: Don't collapse whitespace inside pre tag.- Added
spec.html
to.gitignore
(#339). - Add
-dev
suffix to spec version after release (eksperimental). - Rename "non-space" to "non-whitespace" (Konstantin Zudov, #337).
CommonMark 0.20
- Require at least one nonspace character in a link label (#322).
- Require replacement (rather than omission) of U+0000 (#327).
- Clarified that entities resolving to U+0000 are to be
replaced by U+FFFD (#323). - Removed statement that what counts as a line ending is
platform-dependent (#326). We now count\r
,\n
,
or\r\n
as a line ending regardless of the platform.
(The line ending styles can even be mixed in a single document.) - Defined "space."
- Revised "non-space character". Previously a non-space character
was defined as anything but a space (U+0020). Now it is anything
that is not a whitespace character (as defined in the spec). - Clarified that tab expansion is a preprocessing step (#330).
- Clarified lazy block quote examples (#328).
- Clarified precedence of indentation that meets conditions for
both list item continuation blocks and indented code. - Added a test case with
#
directly followed by a letter
(not an ATX header). - Added two test cases illustrating that a list at the
outer level can have items that are indented by more
than four spaces (see commonmark.js#42 and
http://talk.commonmark.org/t/odd-list-behaviour/1189). - Fixed typo in emphasis examples.
CommonMark 0.19
- Fixed rules for
_
-based emphasis and strong emphasis (#317). Previously_(bar)_.
was not parsed as containing emphasis because the closing delimiter is both left- and right- flanking. This fix allows such delimiters, provided they're followed by punctuation (i.e., they have punctuation on both sides). Similarly, mutatis mutandis, for opening delimiters and for__
. - Clarified definitions of left-flanking and right-flanking (#310). The spec now says explicitly that the beginning and end of line count as whitespace for purposes of this definition.
- Clarified that a code fence followed by header line isn't a header (#306).
- Fixed alignment in flankingness examples (cosmetic).
- Fixed last "right flanking but not left flanking" example (#316).
- Fixed a broken link (Konstantin Zudov).
- Added link to list of implementations on wiki.
- Fixed mistake in examples of left/right flanking delimiters (Konstantin Zudov).
- Spell out
iff
(if and only if) the first time it is used (#309). - Fixed typos (isoroku, #309).
- Clarified wording for soft line break: newline can't be preceded by two spaces or a backslash.
- Replaced some references to UTF-8 that should be to unicode.
- Fixed dingus link in tools/template.html.
- Replaced obsolete reference to
spec2md.pl
in spec (#304).
CommonMark 0.18
-
Added a shortcut link test with mismatched brackets (#282).
-
Added cases with newline whitespace around emphasis open delimiter
(#282). -
Added list item examples with no space after marker (#282).
-
Added additional test showing backslash escapes don't work in
autolinks (#282). -
Added test for multiline title in reference definition (#282).
-
Added a reference link definition test case (#282).
-
Clarified that link titles can't contain blank lines (#271).
-
Revised Rule 3 for list items (#275). Previously this just applied to
empty list items. It has been rewritten to apply to any list item
starting with a blank line, including items like:- ``` code ```
-
Added U+000B and U+000C as whitespace characters (#300).
-
Added comment on sourcepos attribute format in DTD (#298).
-
Use
--smart
option in producing HTML version of spec. -
Clarified that delimiter runs at beginning/end of line behave as
if preceded/followed by whitespace (#302). -
Ensure that URLs in examples have slash after domain.
This helps with #9, making these tests less sensitive to
the normalizer used. -
Fixed typo (Robin Stocker).
CommonMark 0.17
Note: with this release, we have split off the reference implementations into separate repositories. The JavaScript implementation is in https://github.com/jgm/commonmark.js, and the C implementation is in https://github.com/jgm/cmark. This repository contains the spec and tools for formatting the spec and running tests against it.
Spec changes:
- Improved rule limiting intraword
_
for emphasis and strong emphasis. To prevent intra-word emphasis, we used to check to see if the delimiter was followed/preceded by an ASCII alphanumeric. We now do something more elegant: whereas an opening*
must be left-flanking, an opening_
must be left-flanking and not right-flanking. And so on for the other cases. All the original tests passed except some tests with Russian text with internal_
, which formerly created emphasis but no longer do with the new rule. These tests have been adjusted. A few new test cases have been added to illustrate the rule. - Added example with link break inside pointy braces (no link) (#295).
- Added spec example: loose list with blank line after fenced code (#285).
CommonMark 0.16
Spec changes
- Rewrote beginning of Entities section, clarifying that only entities not in code blocks or spans are decoded.
- Removed defective Example 449 (#284).
- Fixed typo (#283).
- Added intended two-space hard-breaks in Examples 521, 523.
- Clarified that brackets in general don't take precedence over emph (#258).
- Clarified that final newline is removed from paragraph content (#176).
- Talk of "info string" rather than "attributes" for code blocks (#262).
- Clarified precedence of code spans, HTML tags, autolinks (#259).
- Fixed a number of internal links and duplicate references in the spec.
- Linkify "info string" in spec.
- Use shortcut reference links when possible in spec.txt.
- cmark itself is now used to build spec.html, rather than pandoc.
- Use shortcut reference links when possible in spec.txt. This relies on the new
spec2md.py
behavior of creating references for all internal anchors. - Moved some examples from block to inline HTML section.
- Added examples of non-comments (#264).
- Changed rule for comments to conform to HTML5 spec.
- Made clear that any sequence of characters is a valid document (#266).
- Changed wording: "is preferred" -> "takes precedence."
- Regularized spelling of "non-space character" and added links (#260).
- Use four spaces rather than five to show "four spaces is too much" (#261).
cmark/libcmark
- Added xml renderer (XML representation of the CommonMark AST, which is described in
CommonMark.dtd
). - Reduced size of gperf entity table (Nick Wellnhofer).
- Reworked iterators to allow deletion of nodes during iteration (Nick Wellnhofer).
- Optimized
S_is_leaf
. - Added
cmark_iter_reset
to iterator API. - Added
cmark_consolidate_text_nodes
to API to combine adjacent text nodes. - Added
CMARK_OPT_NORMALIZE
to options (this combines adjacent text nodes). - Added
--normalize
option to command-line program. - Improved regex for HTML comments in inline parsing.
- Python is no longer required for a basic build from the repository.
commonmark.js
- Improved regex for HTML comments (#263).
- Fixed CDATA regex (#267).
- Use linked list instead of arrays in AST: the same doubly linked node structure as cmark uses. This simplifies some code and eliminates the need for recursive algorithms, so we can render deeply-nested structures without stack overflows.
- Use
children
instead oflabel
(in Image and Link),inline_content
(in Paragraph), andc
(in Emph and Strong). - Renamed the
c
property toliteral
to matchlibcmark
. - Use
literal
rather thanstring_content
property for code blocks, HTML.string_content
is reserved for raw string content that has yet to be parsed as inlines. - Improved end lines (#276).
- Added a node walker, for easy AST traversal (see
node.js
). - Regularized position information into a
sourcepos
property. Added end column information. - Renamed
html-renderer.js
tohtml.js
. - Replace NUL characters with U+FFFD, as per spec.
- Optimized code, resulting in significant performance gains. (We've gone from being twice as fast as showdown.js to being three times as fast, on par with marked.)
- Made
tight
a property oflist_data
rather thanNode
. - Added options to renderer, parser objections.
- Added a
--sourcepos
command line option tojs/bin/commonmark
. - HTML renderer now throws an error on unknown tag type (which indicates a programming error).
- Removed
ansi.js
code from the source tree. The test suite now uses its own mini ansi colors implementation. - Added
--time
option tojs/bin/commonmark
. - Added an XML renderer (XML representation of the AST, matching
Commonmark.dtd
). - Changed
url
property todestination
to matchcmark
and spec. - Added
js/common.js
to hold some common code, like string unescaping and URI normalization. - Use
decodeURI
instead ofunescape
. - Added some "pathological" test cases to test suite.