diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-03-18 11:27:42 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-03-18 11:30:20 -0700 |
commit | 6beba76f61faa41c4351fa4eb54161c060315a23 (patch) | |
tree | 62cc4da5965e08f8630a25701769dbb8917532a1 /src/Text/Pandoc/Readers/RST.hs | |
parent | d1304e835670a3e025e0f1b5ca3d38dca1ee6d62 (diff) | |
download | pandoc-6beba76f61faa41c4351fa4eb54161c060315a23.tar.gz |
Changed uri parser so it doesn't include trailing punctuation.
So, in RST, 'http://google.com.' should be parsed as a link
to 'http://google.com' followed by a period.
The parser is smart enough to recognize balanced parentheses,
as often occur in wikipedia links: 'http://foo.bar/baz_(bam)'.
Also added ()s to RST specialChars, so '(http://google.com)'
will be parsed as a link in parens.
Added test cases.
Resolves Issue #291.
Diffstat (limited to 'src/Text/Pandoc/Readers/RST.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 2cfab0f53..736219d68 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -58,7 +58,7 @@ underlineChars = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" -- treat these as potentially non-text when parsing inline: specialChars :: [Char] -specialChars = "\\`|*_<>$:[-.\"'\8216\8217\8220\8221" +specialChars = "\\`|*_<>$:[]()-.\"'\8216\8217\8220\8221" -- -- parsing documents |