Skip to content

Commit 5ba0dbe

Browse files
committed
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.
1 parent d4d69fa commit 5ba0dbe

File tree

2 files changed

+1625
-285
lines changed

2 files changed

+1625
-285
lines changed

src/Text/Pandoc/Readers/Djot.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ convertInlines = fmap mconcat . mapM convertInline . F.toList . D.unMany
186186
convertInline :: PandocMonad m => D.Node D.Inline -> ReaderT Env m Inlines
187187
convertInline (D.Node pos attr il) = addAttrToInline pos attr <$>
188188
case il of
189-
D.Str bs -> pure $ str (UTF8.toText bs)
189+
D.Str bs -> pure $ text (UTF8.toText bs)
190190
D.Emph ils -> emph <$> convertInlines ils
191191
D.Strong ils -> strong <$> convertInlines ils
192192
D.Highlight ils -> spanWith ("",["mark"],[]) <$> convertInlines ils

0 commit comments

Comments
 (0)