Roff reader: handle \ line continuation in table cells.

Closes #11635.
This commit is contained in:
John MacFarlane
2026-05-11 12:30:20 +02:00
parent 408b177bba
commit b8a0e5e85d
2 changed files with 30 additions and 1 deletions
+2 -1
View File
@@ -268,7 +268,8 @@ tableCell = do
manyTill anyChar (try (string "T}"))
simpleCell = do
tabChar <- tableTabChar <$> getState
many (notFollowedBy (char tabChar <|> newline) >> anyChar)
many $ (char '\\' >> anyChar)
<|> (notFollowedBy (char tabChar <|> newline) >> anyChar)
tableRow :: PandocMonad m => RoffLexer m [RoffTokens]
tableRow = do
+28
View File
@@ -0,0 +1,28 @@
```
% pandoc -f man -t html
.TH "TEST" "1" "2026-05-08" "test v1.0.0" "test manual"
.SH HEADING
.TS
tab(;);
l l.
this is a table element \
written in two lines;abcdefg
another \
one;123456
.TE
^D
<h1>HEADING</h1>
<table>
<tbody>
<tr>
<td style="text-align: left;">this is a table element written in two
lines</td>
<td style="text-align: left;">abcdefg</td>
</tr>
<tr>
<td style="text-align: left;">another one</td>
<td style="text-align: left;">123456</td>
</tr>
</tbody>
</table>
```