diff options
| author | Albert Krewinkel <albert@zeitkraut.de> | 2019-01-01 22:06:44 +0100 | 
|---|---|---|
| committer | Albert Krewinkel <albert@zeitkraut.de> | 2019-01-01 22:06:44 +0100 | 
| commit | 2f92261d877c50d1909ae58c135700b35ffc111e (patch) | |
| tree | e14c0590410afb74a08dd81b539308ec338c9bc8 /src/Text | |
| parent | c0caaaeabb3646d6156a0857e250969b4244cdc5 (diff) | |
| download | pandoc-2f92261d877c50d1909ae58c135700b35ffc111e.tar.gz | |
Org reader: fix self-link parsing regression
Fixes a regression introduced by the previous commit.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/Org/Inlines.hs | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/src/Text/Pandoc/Readers/Org/Inlines.hs b/src/Text/Pandoc/Readers/Org/Inlines.hs index b8aee0322..6560def7e 100644 --- a/src/Text/Pandoc/Readers/Org/Inlines.hs +++ b/src/Text/Pandoc/Readers/Org/Inlines.hs @@ -448,11 +448,12 @@ selflinkOrImage :: PandocMonad m => OrgParser m (F Inlines)  selflinkOrImage = try $ do    target <- char '[' *> linkTarget <* char ']'    case cleanLinkString target of -    Nothing        -> return $ internalLink target (B.str target) -    Just nonDocTgt -> returnF $ -                      if isImageFilename nonDocTgt -                      then B.image nonDocTgt "" "" -                      else B.link nonDocTgt "" (B.str target) +    Nothing        -> case target of +                        '#':_ -> returnF $ B.link target "" (B.str target) +                        _     -> return $ internalLink target (B.str target) +    Just nonDocTgt -> if isImageFilename nonDocTgt +                      then returnF $ B.image nonDocTgt "" "" +                      else returnF $ B.link nonDocTgt "" (B.str target)  plainLink :: PandocMonad m => OrgParser m (F Inlines)  plainLink = try $ do | 
