git.iko.soy/typeable/pandoc
on master help sign in
RST reader: avoid spurious warning...

when resolving links to internal anchors ending with `_`. Closes #5763.

commit311a20c6c5f9d230a1f5c597e0d351a32cddb01f authorJohn MacFarlane <jgm@berkeley.edu> dateSat 2 Nov 2019, 22:26 (7 years ago) parent6559304
1 file changed+1−1
src/Text/Pandoc/Readers/RST.hs+1−1
src/Text/Pandoc/Readers/RST.hs+1−1
@@ -1544,7 +1544,7 @@ lookupKey oldkeys key = do
15441544 logMessage $ ReferenceNotFound key' pos
15451545 return (("",""),nullAttr)
15461546 -- check for keys of the form link_, which need to be resolved:
1547− Just ((u@(_:_),""),_) | last u == '_' -> do
1547+ Just ((u@(c:_),""),_) | last u == '_', c /= '#' -> do
15481548 let rawkey = init u
15491549 let newkey = toKey rawkey
15501550 if newkey `elem` oldkeys