RST reader: fix bug with internal link targets.

They were gobbling up indented content underneath.
Closes #4919.
This commit is contained in:
John MacFarlane
2018-09-20 11:15:03 -07:00
parent 5b1fdeaf41
commit 37c6f6adfe
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -1090,7 +1090,7 @@ referenceKey = do
targetURI :: Monad m => ParserT [Char] st m [Char]
targetURI = do
skipSpaces
optional newline
optional $ try $ newline >> notFollowedBy blankline
contents <- trim <$>
many1 (satisfy (/='\n')
<|> try (newline >> many1 spaceChar >> noneOf " \t\n"))
+14
View File
@@ -0,0 +1,14 @@
```
% pandoc -f rst -t native
.. _`tgtmath`:
.. math::
:name:
V = \frac{K}{r^2}
^D
[Div ("tgtmath",[],[])
[BlockQuote
[Para [Math DisplayMath "V = \\frac{K}{r^2}"]]]]
```