diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2014-11-05 22:27:25 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2014-11-05 22:27:25 +0100 |
commit | daaf635806fba3ec459da3c2c97301920cea1270 (patch) | |
tree | c9998cf7a07af68a54eefd8fdd729fe66a9fb93f /tests/Tests/Readers | |
parent | f3ac41937d732c3ff31b4cce47578dc9afd8836c (diff) | |
download | pandoc-daaf635806fba3ec459da3c2c97301920cea1270.tar.gz |
Org reader: absolute, relative paths in links
The org reader was to restrictive when parsing links, some relative
links and links to files given as absolute paths were not recognized
correctly. The org reader's link parsing function was amended to handle
such cases properly.
This fixes #1741
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 392388ec0..fd337f760 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -197,6 +197,14 @@ tests = "[[http://zeitlens.com/]]" =?> (para $ link "http://zeitlens.com/" "" "http://zeitlens.com/") + , "Absolute file link" =: + "[[/url][hi]]" =?> + (para $ link "file:///url" "" "hi") + + , "Link to file in parent directory" =: + "[[../file.txt][moin]]" =?> + (para $ link "../file.txt" "" "moin") + , "Image link" =: "[[sunset.png][dusk.svg]]" =?> (para $ link "sunset.png" "" (image "dusk.svg" "" "")) |