diff options
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX/Table.hs | 4 | ||||
-rw-r--r-- | test/command/7272.md | 24 |
2 files changed, 25 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 diff --git a/test/command/7272.md b/test/command/7272.md new file mode 100644 index 000000000..d3a3b2137 --- /dev/null +++ b/test/command/7272.md @@ -0,0 +1,24 @@ +``` +% pandoc -t latex -f html +<table> + <tbody> + <tr> + <td> + <span> + text + <br /> + text2 + </span> + </td> + </tr> + </tbody> +</table> +^D +\begin{longtable}[]{@{} + >{\raggedright\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{1.00}}@{}} +\toprule +\endhead +{\vtop{\hbox{\strut text}\hbox{\strut text2 }}} \\ +\bottomrule +\end{longtable} +``` |