git.iko.soy/typeable/pandoc
on master help sign in
RST reader: Renamed 'image' to 'subst', since it now handles more.
9366d86John MacFarlane
src/Text/Pandoc/Readers/RST.hs+3−4
@@ -853,7 +853,7 @@ inline = choice [ whitespace
853 , strong
853 , strong
854 , emph
854 , emph
855 , code
855 , code
856− , image
856+ , subst
857 , superscript
857 , superscript
858 , subscript
858 , subscript
859 , math
859 , math
@@ -1018,9 +1018,8 @@ autoEmail = do
1018autoLink :: RSTParser Inlines
1018autoLink :: RSTParser Inlines
1019autoLink = autoURI <|> autoEmail
1019autoLink = autoURI <|> autoEmail
1020
1020
1021−-- For now, we assume that all substitution references are for images.
1022−image :: RSTParser Inlines
1021+subst :: RSTParser Inlines
1023−image = try $ do
1022+subst = try $ do
1024 (_,ref) <- withRaw $ enclosed (char '|') (char '|') inline
1023 (_,ref) <- withRaw $ enclosed (char '|') (char '|') inline
1025 state <- getState
1024 state <- getState
1026 let substTable = stateSubstitutions state
1025 let substTable = stateSubstitutions state