mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-30 17:59:17 +08:00
RST reader: fix bug with internal link targets.
They were gobbling up indented content underneath. Closes #4919.
This commit is contained in:
@@ -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"))
|
||||
|
||||
@@ -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}"]]]]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user