mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
LaTeX reader: handle \hypertarget with one braced parameter.
This seems to work in LaTeX, no doubt because a single token is consumed as the target text parameter. Closes #7418.
This commit is contained in:
@@ -590,7 +590,7 @@ hypertargetBlock = try $ do
|
||||
hypertargetInline :: PandocMonad m => LP m Inlines
|
||||
hypertargetInline = try $ do
|
||||
ref <- untokenize <$> braced
|
||||
ils <- grouped inline
|
||||
ils <- tok
|
||||
return $ spanWith (ref, [], []) ils
|
||||
|
||||
newToggle :: (Monoid a, PandocMonad m) => [Tok] -> LP m a
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
```
|
||||
% pandoc -f markdown+raw_tex -t latex
|
||||
Lorem \hypertarget{anchor} etc
|
||||
|
||||
Lorem \hyperlink{anchor}{the link} etc
|
||||
^D
|
||||
Lorem \hypertarget{anchor} etc
|
||||
|
||||
Lorem \hyperlink{anchor}{the link} etc
|
||||
```
|
||||
Reference in New Issue
Block a user