aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/RST.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-11-02 22:26:07 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-02 22:26:07 -0700
commit311a20c6c5f9d230a1f5c597e0d351a32cddb01f (patch)
treef945eb97cedd862055f7aea7ad48aa7de741cdc3 /src/Text/Pandoc/Readers/RST.hs
parent65593043c33b97f55170a53eb330d7ce069774cd (diff)
downloadpandoc-311a20c6c5f9d230a1f5c597e0d351a32cddb01f.tar.gz
RST reader: avoid spurious warning...
when resolving links to internal anchors ending with `_`. Closes #5763.
Diffstat (limited to 'src/Text/Pandoc/Readers/RST.hs')
-rw-r--r--src/Text/Pandoc/Readers/RST.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index 35b9ade65..7e29caf28 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -1544,7 +1544,7 @@ lookupKey oldkeys key = do
logMessage $ ReferenceNotFound key' pos
return (("",""),nullAttr)
-- check for keys of the form link_, which need to be resolved:
- Just ((u@(_:_),""),_) | last u == '_' -> do
+ Just ((u@(c:_),""),_) | last u == '_', c /= '#' -> do
let rawkey = init u
let newkey = toKey rawkey
if newkey `elem` oldkeys