LaTeX reader: omit visible content for \label{...}
.
Previously we included the text of the label in square brackets, but this is undesirable in many cases. See discussion in <https://github.com/jgm/pandoc/issues/813#issuecomment-978232426>.
This commit is contained in:
parent
6072bdcec9
commit
7726b69cd3
2 changed files with 2 additions and 5 deletions
|
@ -56,8 +56,7 @@ dolabel = do
|
|||
let refstr = untokenize v
|
||||
updateState $ \st ->
|
||||
st{ sLastLabel = Just refstr }
|
||||
return $ spanWith (refstr,[],[("label", refstr)])
|
||||
$ inBrackets $ str $ untokenize v
|
||||
return $ spanWith (refstr,[],[("label", refstr)]) mempty
|
||||
|
||||
doref :: PandocMonad m => Text -> LP m Inlines
|
||||
doref cls = do
|
||||
|
|
|
@ -287,9 +287,7 @@ Figure \ref{fig:Logo3} illustrated the SVG logo
|
|||
\label{section} Section \ref{section}
|
||||
^D
|
||||
[ Para
|
||||
[ Span
|
||||
( "section" , [] , [ ( "label" , "section" ) ] )
|
||||
[ Str "[section]" ]
|
||||
[ Span ( "section" , [] , [ ( "label" , "section" ) ] ) []
|
||||
, Space
|
||||
, Str "Section"
|
||||
, Space
|
||||
|
|
Loading…
Add table
Reference in a new issue