From 136bf901aa088eaf4e5c996c71e0a36c171f1587 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 19 Sep 2018 14:49:46 -0700 Subject: Markdown reader: distinguish autolinks in the AST. With this change, autolinks are parsed as Links with the `uri` class. (The same is true for bare links, if the `autolink_bare_uris` extension is enabled.) Email autolinks are parsed as Links with the `email` class. This allows the distinction to be represented in the URI. Formerly the `uri` class was added to autolinks by the HTML writer, but it had to guess what was an autolink and could not distinguish `[http://example.com](http://example.com)` from ``. It also incorrectly recognized `[pandoc](pandoc)` as an autolink. Now the HTML writer simply passes through the `uri` attribute if it is present, but does not add anything. The Textile writer has been modified so that the `uri` class is not explicitly added for autolinks, even if it is present. Closes #4913. --- test/writer.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/writer.textile') diff --git a/test/writer.textile b/test/writer.textile index d19b698f9..78e659091 100644 --- a/test/writer.textile +++ b/test/writer.textile @@ -660,7 +660,7 @@ With an ampersand: "$":http://example.com/?foo=1&bar=2 * "$":http://example.com/ * It should. -An e-mail address: "nobody@nowhere.net":mailto:nobody@nowhere.net +An e-mail address: "(email)nobody@nowhere.net":mailto:nobody@nowhere.net bq. Blockquoted: "$":http://example.com/ -- cgit v1.2.3