diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-04-17 13:04:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-04-17 13:04:15 -0700 |
commit | 8f40b4ba14fce10199a059a281c9bd10c884241d (patch) | |
tree | cb3d03b61d80052b5edfa5d526ac964fd53b3937 /src/Text/Pandoc | |
parent | 2877ca70ecaf5b6715b38f41165974f89206d18b (diff) | |
download | pandoc-8f40b4ba14fce10199a059a281c9bd10c884241d.tar.gz |
LaTeX reader: don't put surrounding Div around Table.
This reverts a change in the last release; the Div is
no longer needed, because we can now put the id right in
the Table's attributes. However, writers may still need
to be modified to do something with the id in a Table
(e.g. create an anchor), so in the short term we may lose
the ability to link to tables in some writers.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index cdd2c1362..b6bc039df 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -2417,8 +2417,11 @@ addTableCaption = walkM go (sLabels st) } return $ caption Nothing (plain ils) -- add number?? (Nothing, _) -> return c - return $ maybe id (\ident -> Div (ident, [], []) . (:[])) mblabel $ - Table attr capt spec th tb tf + let attr' = case (attr, mblabel) of + ((_,classes,kvs), Just ident) -> + (ident,classes,kvs) + _ -> attr + return $ Table attr' capt spec th tb tf go x = return x block :: PandocMonad m => LP m Blocks |