diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-05-11 07:52:05 -0600 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-05-11 07:52:05 -0600 |
commit | 2bd5d0cafbe67fa723f49fd2d35d913594fdb935 (patch) | |
tree | 12c0bf80f9833e3295d5723e450371d28b2cb613 /src/Text/Pandoc | |
parent | ff7176de80726a5db4c4bc4c5a3296b2bcdab192 (diff) | |
download | pandoc-2bd5d0cafbe67fa723f49fd2d35d913594fdb935.tar.gz |
LaTeX writer: better handling of line breaks in simple tables.
Now we also handle the case where they're embedded in other
elements, e.g. spans. Closes #7272.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX/Table.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX/Table.hs b/src/Text/Pandoc/Writers/LaTeX/Table.hs index 6f8386937..16f63314b 100644 --- a/src/Text/Pandoc/Writers/LaTeX/Table.hs +++ b/src/Text/Pandoc/Writers/LaTeX/Table.hs @@ -219,9 +219,7 @@ footRows (Ann.TableFoot _attr rows) = map headerRowCells rows -- we need to go to some lengths to get line breaks working: -- as LineBreak bs = \vtop{\hbox{\strut as}\hbox{\strut bs}}. fixLineBreaks :: Block -> Block -fixLineBreaks (Para ils) = Para $ fixLineBreaks' ils -fixLineBreaks (Plain ils) = Plain $ fixLineBreaks' ils -fixLineBreaks x = x +fixLineBreaks = walk fixLineBreaks' fixLineBreaks' :: [Inline] -> [Inline] fixLineBreaks' ils = case splitBy (== LineBreak) ils of |