git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Use `label` instead of `data-label` for label in caption.

See d441e656db576f266c4866e65ff9e4705d376381, #3639.

commit09b7df472dbc171e6130090dfec0f7b71d1d955e authorJohn MacFarlane <jgm@berkeley.edu> dateWed 9 Aug 2017, 09:14 (9 years ago) parentdb55f7c
2 files changed+2−2
src/Text/Pandoc/Readers/LaTeX.hs+1−1 test/command/2118.md+1−1
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -1632,7 +1632,7 @@ setCaption = do
16321632 try $ spaces >> controlSeq "label" >> (Just <$> tok)
16331633 let ils' = case mblabel of
16341634 Just lab -> ils <> spanWith
1635− ("",[],[("data-label", stringify lab)]) mempty
1635+ ("",[],[("label", stringify lab)]) mempty
16361636 Nothing -> ils
16371637 updateState $ \st -> st{ sCaption = Just ils' }
16381638 return mempty
test/command/2118.md+1−1
@@ -7,5 +7,5 @@
77 \label{fig:setminus}
88\end{figure}
99^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:")]]
1111```