From 83b69ead8123a3483ec79a9df5be85612c3b564e Mon Sep 17 00:00:00 2001 From: Stephen Altamirano Date: Thu, 22 Jun 2023 10:53:15 -0700 Subject: Textile reader: Add support for link references (#8706) Textile supports what it calls "link alias", which are analogous to Markdown's reference-style links. --- test/textile-reader.native | 27 +++++++++++++++++++++++++++ test/textile-reader.textile | 6 ++++++ 2 files changed, 33 insertions(+) (limited to 'test') diff --git a/test/textile-reader.native b/test/textile-reader.native index 184c1da90..3c23a5c73 100644 --- a/test/textile-reader.native +++ b/test/textile-reader.native @@ -749,6 +749,33 @@ Pandoc , Space , Str "spaces." ] + , Para + [ Str "A" + , Space + , Link + ( "" , [] , [] ) [ Str "link" ] ( "ftp://example.com" , "" ) + , Space + , Str "to" + , Space + , Str "a" + , Space + , Str "named" + , Space + , Str "target" + ] + , Para + [ Str "A" + , Space + , Link ( "" , [] , [] ) [ Str "link" ] ( "missing" , "" ) + , Space + , Str "to" + , Space + , Str "a" + , Space + , Str "missing" + , Space + , Str "target" + ] , Header 1 ( "tables" , [] , [] ) [ Str "Tables" ] , Para [ Str "Textile" diff --git a/test/textile-reader.textile b/test/textile-reader.textile index 194353c9c..a0497b401 100644 --- a/test/textile-reader.textile +++ b/test/textile-reader.textile @@ -183,6 +183,10 @@ Automatic linking to "$":http://www.example.com. A link["with brackets":http://www.example.com]and no spaces. +A "link":link-target to a named target + +A "link":missing to a missing target + h1. Tables Textile allows tables with and without headers : @@ -277,3 +281,5 @@ h1. Comment blocks is here. not a comment. + +[link-target]ftp://example.com -- cgit v1.2.3