diff options
author | John MacFarlane <jgm@berkeley.edu> | 2012-11-06 16:05:17 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2012-11-06 16:05:17 -0800 |
commit | 4cd573c61f61885cb368b40dccd1b458c39846c7 (patch) | |
tree | c8fe5e6d7429b1d14fbe6b6ae1bfcd797b8fe626 /src/Text/Pandoc/Writers/Textile.hs | |
parent | 4aa3e1f978fc285d16f047c800504b03cc897ec8 (diff) | |
download | pandoc-4cd573c61f61885cb368b40dccd1b458c39846c7.tar.gz |
Textile reader/writer: Fixed autolinks.
Previously the textile reader and writer incorrectly implented
RST-style autolinks for URLs and email addresses.
This has been fixed. Now an autolink is done this way:
"$":http://myurl.com
Diffstat (limited to 'src/Text/Pandoc/Writers/Textile.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Textile.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Textile.hs b/src/Text/Pandoc/Writers/Textile.hs index 5f3bb6bcd..44fdc7efb 100644 --- a/src/Text/Pandoc/Writers/Textile.hs +++ b/src/Text/Pandoc/Writers/Textile.hs @@ -396,7 +396,10 @@ inlineToTextile _ Space = return " " inlineToTextile opts (Link txt (src, _)) = do label <- case txt of - [Code _ s] -> return s + [Code _ s] + | s == src -> return "$" + [Str s] + | s == src -> return "$" _ -> inlineListToTextile opts txt return $ "\"" ++ label ++ "\":" ++ src |