mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-26 17:35:49 +00:00
Org writer: don't render table body rows twice.
Table rows were converted once to compute column widths and then again to produce the output. Since blockListToOrg is stateful, any footnote in a table cell was registered twice, yielding duplicate footnote definitions and skewed numbering; it also doubled the rendering work. Reuse the first conversion. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
10e95ba298
commit
f06f5ad062
@@ -246,8 +246,7 @@ blockToOrg (Table _ blkCapt specs thead tbody tfoot) = do
|
||||
middle = hcat $ intersperse sep' blocks
|
||||
let makeRow = hpipeBlocks . zipWith lblock widthsInChars
|
||||
let head' = makeRow headers'
|
||||
rows' <- mapM (\row -> do cols <- mapM blockListToOrg row
|
||||
return $ makeRow cols) rows
|
||||
let rows' = map makeRow rawRows
|
||||
let border ch = char '|' <> char ch <>
|
||||
(hcat . intersperse (char ch <> char '+' <> char ch) $
|
||||
map (\l -> text $ replicate l ch) widthsInChars) <>
|
||||
|
||||
Reference in New Issue
Block a user