git.iko.soy/typeable/pandoc
on master help sign in
RST reader: skip whitespace before note.
e666c92Jesse Rosenthal
src/Text/Pandoc/Readers/RST.hs+3−2
@@ -949,7 +949,8 @@ table = gridTable False <|> simpleTable False <|>
949--
949--
950
950
951inline :: RSTParser Inlines
951inline :: RSTParser Inlines
952+inline = choice [ note -- can start with whitespace, so try before ws
952−inline = choice [ whitespace
953+ , whitespace
953 , link
954 , link
954 , str
955 , str
955 , endline
956 , endline
@@ -958,7 +959,6 @@ inline = choice [ whitespace
958 , code
959 , code
959 , subst
960 , subst
960 , interpretedRole
961 , interpretedRole
961− , note
962 , smart
962 , smart
963 , hyphens
963 , hyphens
964 , escapedChar
964 , escapedChar
@@ -1174,6 +1174,7 @@ subst = try $ do
1174
1174
1175note :: RSTParser Inlines
1175note :: RSTParser Inlines
1176note = try $ do
1176note = try $ do
1177+ optional whitespace
1177 ref <- noteMarker
1178 ref <- noteMarker
1178 char '_'
1179 char '_'
1179 state <- getState
1180 state <- getState