summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/spec.txt100
1 files changed, 48 insertions, 52 deletions
diff --git a/test/spec.txt b/test/spec.txt
index e11df78..fc2825d 100644
--- a/test/spec.txt
+++ b/test/spec.txt
@@ -1,8 +1,8 @@
---
title: CommonMark Spec
author: John MacFarlane
-version: 0.22
-date: 2015-08-23
+version: 0.23
+date: 2015-12-29
license: '[CC-BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)'
...
@@ -319,7 +319,7 @@ bar
## Insecure characters
For security reasons, the Unicode character `U+0000` must be replaced
-with the replacement character (`U+FFFD`).
+with the REPLACEMENT CHARACTER (`U+FFFD`).
# Blocks and inlines
@@ -4960,8 +4960,8 @@ foo
## Entity and numeric character references
All valid HTML entity references and numeric character
-references, except those occuring in code blocks, code spans,
-and raw HTML, are recognized as such and treated as equivalent to the
+references, except those occuring in code blocks and code spans,
+are recognized as such and treated as equivalent to the
corresponding Unicode characters. Conforming CommonMark parsers
need not store information about whether a particular character
was represented in the source using a Unicode character or
@@ -4988,7 +4988,7 @@ references](@decimal-numeric-character-references)
consist of `&#` + a string of 1--8 arabic digits + `;`. A
numeric character reference is parsed as the corresponding
Unicode character. Invalid Unicode code points will be replaced by
-the "unknown code point" character (`U+FFFD`). For security reasons,
+the REPLACEMENT CHARACTER (`U+FFFD`). For security reasons,
the code point `U+0000` will also be replaced by `U+FFFD`.
.
@@ -5013,10 +5013,10 @@ Here are some nonentities:
.
&nbsp &x; &#; &#x;
-&ThisIsWayTooLongToBeAnEntityIsntIt; &hi?;
+&ThisIsNotDefined; &hi?;
.
<p>&amp;nbsp &amp;x; &amp;#; &amp;#x;
-&amp;ThisIsWayTooLongToBeAnEntityIsntIt; &amp;hi?;</p>
+&amp;ThisIsNotDefined; &amp;hi?;</p>
.
Although HTML5 does accept some entity references
@@ -5039,7 +5039,7 @@ recognized as entity references either:
.
Entity and numeric character references are recognized in any
-context besides code spans or code blocks or raw HTML, including
+context besides code spans or code blocks, including
URLs, [link title]s, and [fenced code block][] [info string]s:
.
@@ -5072,7 +5072,7 @@ foo
.
Entity and numeric character references are treated as literal
-text in code spans and code blocks, and in raw HTML:
+text in code spans and code blocks:
.
`f&ouml;&ouml;`
@@ -5087,12 +5087,6 @@ text in code spans and code blocks, and in raw HTML:
</code></pre>
.
-.
-<a href="f&ouml;f&ouml;"/>
-.
-<a href="f&ouml;f&ouml;"/>
-.
-
## Code spans
A [backtick string](@backtick-string)
@@ -7551,34 +7545,13 @@ An [absolute URI](@absolute-uri),
for these purposes, consists of a [scheme] followed by a colon (`:`)
followed by zero or more characters other than ASCII
[whitespace] and control characters, `<`, and `>`. If
-the URI includes these characters, you must use percent-encoding
+the URI includes these characters, they must be percent-encoded
(e.g. `%20` for a space).
-The following [schemes](@scheme)
-are recognized (case-insensitive):
-`coap`, `doi`, `javascript`, `aaa`, `aaas`, `about`, `acap`, `cap`,
-`cid`, `crid`, `data`, `dav`, `dict`, `dns`, `file`, `ftp`, `geo`, `go`,
-`gopher`, `h323`, `http`, `https`, `iax`, `icap`, `im`, `imap`, `info`,
-`ipp`, `iris`, `iris.beep`, `iris.xpc`, `iris.xpcs`, `iris.lwz`, `ldap`,
-`mailto`, `mid`, `msrp`, `msrps`, `mtqp`, `mupdate`, `news`, `nfs`,
-`ni`, `nih`, `nntp`, `opaquelocktoken`, `pop`, `pres`, `rtsp`,
-`service`, `session`, `shttp`, `sieve`, `sip`, `sips`, `sms`, `snmp`,`
-soap.beep`, `soap.beeps`, `tag`, `tel`, `telnet`, `tftp`, `thismessage`,
-`tn3270`, `tip`, `tv`, `urn`, `vemmi`, `ws`, `wss`, `xcon`,
-`xcon-userid`, `xmlrpc.beep`, `xmlrpc.beeps`, `xmpp`, `z39.50r`,
-`z39.50s`, `adiumxtra`, `afp`, `afs`, `aim`, `apt`,` attachment`, `aw`,
-`beshare`, `bitcoin`, `bolo`, `callto`, `chrome`,` chrome-extension`,
-`com-eventbrite-attendee`, `content`, `cvs`,` dlna-playsingle`,
-`dlna-playcontainer`, `dtn`, `dvb`, `ed2k`, `facetime`, `feed`,
-`finger`, `fish`, `gg`, `git`, `gizmoproject`, `gtalk`, `hcp`, `icon`,
-`ipn`, `irc`, `irc6`, `ircs`, `itms`, `jar`, `jms`, `keyparc`, `lastfm`,
-`ldaps`, `magnet`, `maps`, `market`,` message`, `mms`, `ms-help`,
-`msnim`, `mumble`, `mvn`, `notes`, `oid`, `palm`, `paparazzi`,
-`platform`, `proxy`, `psyc`, `query`, `res`, `resource`, `rmi`, `rsync`,
-`rtmp`, `secondlife`, `sftp`, `sgn`, `skype`, `smb`, `soldat`,
-`spotify`, `ssh`, `steam`, `svn`, `teamspeak`, `things`, `udp`,
-`unreal`, `ut2004`, `ventrilo`, `view-source`, `webcal`, `wtai`,
-`wyciwyg`, `xfire`, `xri`, `ymsgr`.
+For purposes of this spec, a [scheme](@scheme) is any sequence
+of 2--32 characters beginning with an ASCII letter and followed
+by any combination of ASCII letters, digits, or the symbols plus
+("+"), period ("."), or hyphen ("-").
Here are some valid autolinks:
@@ -7608,6 +7581,35 @@ Uppercase is also fine:
<p><a href="MAILTO:FOO@BAR.BAZ">MAILTO:FOO@BAR.BAZ</a></p>
.
+Note that many strings that count as [absolute URI]s for
+purposes of this spec are not valid URIs, because their
+schemes are not registered or because of other problems
+with their syntax:
+
+.
+<a+b+c:d>
+.
+<p><a href="a+b+c:d">a+b+c:d</a></p>
+.
+
+.
+<made-up-scheme://foo,bar>
+.
+<p><a href="made-up-scheme://foo,bar">made-up-scheme://foo,bar</a></p>
+.
+
+.
+<http://../>
+.
+<p><a href="http://../">http://../</a></p>
+.
+
+.
+<localhost:5001/foo>
+.
+<p><a href="localhost:5001/foo">localhost:5001/foo</a></p>
+.
+
Spaces are not allowed in autolinks:
.
@@ -7668,27 +7670,21 @@ These are not autolinks:
.
.
-<heck://bing.bong>
-.
-<p>&lt;heck://bing.bong&gt;</p>
-.
-
-.
< http://foo.bar >
.
<p>&lt; http://foo.bar &gt;</p>
.
.
-<foo.bar.baz>
+<m:abc>
.
-<p>&lt;foo.bar.baz&gt;</p>
+<p>&lt;m:abc&gt;</p>
.
.
-<localhost:5001/foo>
+<foo.bar.baz>
.
-<p>&lt;localhost:5001/foo&gt;</p>
+<p>&lt;foo.bar.baz&gt;</p>
.
.