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:
John MacFarlane
2026-06-08 19:22:24 +02:00
parent 16d66edb2a
commit aafcfa14b0
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -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
+10
View File
@@ -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
```