From 5db6c52fbde7023bd62333bf385fe68ad5ab467d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 12 Feb 2026 21:21:14 +0000 Subject: [PATCH] Textile reader: handle block content in cells. Closes #11455. --- src/Text/Pandoc/Readers/Textile.hs | 8 ++++++-- test/command/11455.md | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 test/command/11455.md diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index cbe10b327..5690ed256 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -413,8 +413,12 @@ tableCell = try $ do notFollowedBy blankline raw <- trim . T.pack <$> many (noneOf "|\n" <|> try (char '\n' <* notFollowedBy blankline)) - content <- mconcat <$> parseFromString' (many inline) raw - return ((isHeader, alignment), B.plain content) + content <- parseFromString' parseBlocks (raw <> "\n\n") + -- Convert lone Para to Plain for backward compatibility + let content' = case B.toList content of + [Para ils] -> B.plain (B.fromList ils) + _ -> content + return ((isHeader, alignment), content') -- | A table row is made of many table cells tableRow :: PandocMonad m => TextileParser m [((Bool, Alignment), Blocks)] diff --git a/test/command/11455.md b/test/command/11455.md new file mode 100644 index 000000000..70fdbecd6 --- /dev/null +++ b/test/command/11455.md @@ -0,0 +1,26 @@ +``` +% pandoc -f textile -t html +| foo | bar | +| table +* item 1 +* item 2 +* item 3 | xxx | +^D + + + + + + + + + + + +
foobar

table

+
    +
  • item 1
  • +
  • item 2
  • +
  • item 3
  • +
xxx
+```