@@ -308,13 +308,18 @@ blockListToOrg blocks = vcat <$> mapM blockToOrg blocks
308308inlineListToOrg :: PandocMonad m
309309 => [Inline]
310310 -> Org m Doc
311−inlineListToOrg lst = hcat <$> mapM inlineToOrg (fixNotes lst)
312− where fixNotes [] = [] -- prevent note ref from wrapping, see #4171
313− fixNotes (Space : n@Note{} : rest) =
314− Str " " : n : fixNotes rest
315− fixNotes (SoftBreak : n@Note{} : rest) =
316− Str " " : n : fixNotes rest
317− fixNotes (x : rest) = x : fixNotes rest
311+inlineListToOrg lst = hcat <$> mapM inlineToOrg (fixMarkers lst)
312+ where fixMarkers [] = [] -- prevent note refs and list markers from wrapping, see #4171
313+ fixMarkers (Space : x : rest) | shouldFix x =
314+ Str " " : x : fixMarkers rest
315+ fixMarkers (SoftBreak : x : rest) | shouldFix x =
316+ Str " " : x : fixMarkers rest
317+ fixMarkers (x : rest) = x : fixMarkers rest
318+
319+ shouldFix Note{} = True -- Prevent footnotes
320+ shouldFix (Str "-") = True -- Prevent bullet list items
321+ -- TODO: prevent ordered list items
322+ shouldFix _ = False
318323
319324-- | Convert Pandoc inline element to Org.
320325inlineToOrg :: PandocMonad m => Inline -> Org m Doc