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