Djot reader: add Space elements.

Previously we just got big Str elements with spaces included.
But many pandoc writers assume that breakable spaces will be
Space elements.  So, we got odd results with e.g. jira output.

Closes #11250.
This commit is contained in:
John MacFarlane
2025-10-27 22:25:18 +01:00
parent d4d69fafb9
commit 5ba0dbe976
2 changed files with 1635 additions and 295 deletions
+1 -1
View File
@@ -186,7 +186,7 @@ convertInlines = fmap mconcat . mapM convertInline . F.toList . D.unMany
convertInline :: PandocMonad m => D.Node D.Inline -> ReaderT Env m Inlines
convertInline (D.Node pos attr il) = addAttrToInline pos attr <$>
case il of
D.Str bs -> pure $ str (UTF8.toText bs)
D.Str bs -> pure $ text (UTF8.toText bs)
D.Emph ils -> emph <$> convertInlines ils
D.Strong ils -> strong <$> convertInlines ils
D.Highlight ils -> spanWith ("",["mark"],[]) <$> convertInlines ils
+1634 -294
View File
File diff suppressed because it is too large Load Diff