From 95279fbf6dfeb43d80590740a9259d7caa614177 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sat, 5 Feb 2022 17:44:26 +0000 Subject: Add tdemarkdown part - embeddable lightweight markdown viewing component. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TDEMarkdown is based on the md4c library and using TDEHTML for rendering its output. For enhanced safety, on HTML widget is turned off everything we don't need for viewing. It integrates nicely into Konqueror and supports both Commonmark and GitHub markdown syntaxes. Signed-off-by: Mavridis Philippe Prepare to merge tdemarkdown into tdelibs. Signed-off-by: Slávek Banko --- tdemarkdown/md4c/test/permissive-url-autolinks.txt | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tdemarkdown/md4c/test/permissive-url-autolinks.txt (limited to 'tdemarkdown/md4c/test/permissive-url-autolinks.txt') diff --git a/tdemarkdown/md4c/test/permissive-url-autolinks.txt b/tdemarkdown/md4c/test/permissive-url-autolinks.txt new file mode 100644 index 000000000..dfd6b5d4d --- /dev/null +++ b/tdemarkdown/md4c/test/permissive-url-autolinks.txt @@ -0,0 +1,99 @@ + +# Permissive URL Autolinks + +With the flag `MD_FLAG_PERMISSIVEURLAUTOLINKS`, MD4C enables more permissive recognition +of URLs and transform them to autolinks, even if they do not exactly follow the syntax +of autolink as specified in CommonMark specification. + +This is a standard CommonMark autolink: + +```````````````````````````````` example +Homepage: +. +

Homepage: https://github.com/mity/md4c

+```````````````````````````````` + +With the permissive autolinks enabled, this is sufficient: + +```````````````````````````````` example +Homepage: https://github.com/mity/md4c +. +

Homepage: https://github.com/mity/md4c

+```````````````````````````````` + +But this permissive autolink feature can work only for very widely used URL +schemes, in alphabetical order `ftp:`, `http:`, `https:`. + +That's why this is not a permissive autolink: + +```````````````````````````````` example +ssh://root@example.com +. +

ssh://root@example.com

+```````````````````````````````` + +The same rules for path validation as for permissivve WWW autolinks apply. +Therefore the final question mark here is not part of the autolink: + +```````````````````````````````` example +Have you ever visited http://www.zombo.com? +. +

Have you ever visited http://www.zombo.com?

+```````````````````````````````` + +But in contrast, in this example it is: + +```````````````````````````````` example +http://www.bing.com/search?q=md4c +. +

http://www.bing.com/search?q=md4c

+```````````````````````````````` + +And finally one complex example: + +```````````````````````````````` example +http://commonmark.org + +(Visit https://encrypted.google.com/search?q=Markup+(business)) + +Anonymous FTP is available at ftp://foo.bar.baz. +. +

http://commonmark.org

+

(Visit https://encrypted.google.com/search?q=Markup+(business))

+

Anonymous FTP is available at ftp://foo.bar.baz.

+```````````````````````````````` + + +## GitHub Issues + +### [Issue 53](https://github.com/mity/md4c/issues/53) + +```````````````````````````````` example +This is [link](http://github.com/). +. +

This is link.

+```````````````````````````````` + +```````````````````````````````` example +This is [link](http://github.com/)X +. +

This is linkX

+```````````````````````````````` + + +## [Issue 76](https://github.com/mity/md4c/issues/76) + +```````````````````````````````` example +*(http://example.com)* +. +

(http://example.com)

+```````````````````````````````` + + +## [Issue 152](https://github.com/mity/md4c/issues/152) + +```````````````````````````````` example +[http://example.com](http://example.com) +. +

http://example.com

+```````````````````````````````` -- cgit v1.2.1