git.iko.soy/typeable/pandoc
on master help sign in
RST reader: fix bug with internal link targets.

They were gobbling up indented content underneath. Closes #4919.

commit37c6f6adfe5f292bccd42046842e5cb2cc7484d0 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 20 Sep 2018, 11:15 (8 years ago) parent5b1fdea
2 files changed+15−1
src/Text/Pandoc/Readers/RST.hs+1−1 test/command/4919.md+14
src/Text/Pandoc/Readers/RST.hs+1−1
@@ -1090,7 +1090,7 @@ referenceKey = do
10901090targetURI :: Monad m => ParserT [Char] st m [Char]
10911091targetURI = do
10921092 skipSpaces
1093− optional newline
1093+ optional $ try $ newline >> notFollowedBy blankline
10941094 contents <- trim <$>
10951095 many1 (satisfy (/='\n')
10961096 <|> try (newline >> many1 spaceChar >> noneOf " \t\n"))
test/command/4919.mdnew file+14
@@ -0,0 +1,14 @@
1+```
2+% pandoc -f rst -t native
3+.. _`tgtmath`:
4+
5+ .. math::
6+ :name:
7+
8+ V = \frac{K}{r^2}
9+^D
10+[Div ("tgtmath",[],[])
11+ [BlockQuote
12+ [Para [Math DisplayMath "V = \\frac{K}{r^2}"]]]]
13+```
14+