diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Org.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index f73822b86..b2f9bbc53 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -308,7 +308,11 @@ blockListToOrg blocks = vcat <$> mapM blockToOrg blocks inlineListToOrg :: PandocMonad m => [Inline] -> Org m Doc -inlineListToOrg lst = hcat <$> mapM inlineToOrg lst +inlineListToOrg lst = hcat <$> mapM inlineToOrg (fixNotes lst) + where fixNotes [] = [] -- prevent note ref from wrapping, see #4171 + fixNotes (Space : n@Note{} : rest) = + Str " " : n : fixNotes rest + fixNotes (x : rest) = x : fixNotes rest -- | Convert Pandoc inline element to Org. inlineToOrg :: PandocMonad m => Inline -> Org m Doc |