git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Use `label` instead of `data-label` for label in caption.
09b7df4John MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -1632,7 +1632,7 @@ setCaption = do
1632 try $ spaces >> controlSeq "label" >> (Just <$> tok)
1632 try $ spaces >> controlSeq "label" >> (Just <$> tok)
1633 let ils' = case mblabel of
1633 let ils' = case mblabel of
1634 Just lab -> ils <> spanWith
1634 Just lab -> ils <> spanWith
1635− ("",[],[("data-label", stringify lab)]) mempty
1635+ ("",[],[("label", stringify lab)]) mempty
1636 Nothing -> ils
1636 Nothing -> ils
1637 updateState $ \st -> st{ sCaption = Just ils' }
1637 updateState $ \st -> st{ sCaption = Just ils' }
1638 return mempty
1638 return mempty
test/command/2118.md+1−1
@@ -7,5 +7,5 @@
7 \label{fig:setminus}
7 \label{fig:setminus}
8\end{figure}
8\end{figure}
9^D
9^D
10−[Para [Image ("",[],[("width","80%")]) [Str "Set",Space,Str "subtraction",Span ("",[],[("data-label","fig:setminus")]) []] ("setminus.png","fig:")]]
10+[Para [Image ("",[],[("width","80%")]) [Str "Set",Space,Str "subtraction",Span ("",[],[("label","fig:setminus")]) []] ("setminus.png","fig:")]]
11```
11```