@@ -300,10 +300,6 @@ blockListToMan opts blocks =
301-- | Convert list of Pandoc inline elements to man.
301-- | Convert list of Pandoc inline elements to man.
302inlineListToMan :: WriterOptions -> [Inline] -> State WriterState Doc
302inlineListToMan :: WriterOptions -> [Inline] -> State WriterState Doc
303−-- if list starts with ., insert a zero-width character \& so it
304−-- won't be interpreted as markup if it falls at the beginning of a line.
305−inlineListToMan opts lst@(Str ('.':_) : _) = mapM (inlineToMan opts) lst >>=
306− (return . (text "\\&" <>) . hcat)
307inlineListToMan opts lst = mapM (inlineToMan opts) lst >>= (return . hcat)
303inlineListToMan opts lst = mapM (inlineToMan opts) lst >>= (return . hcat)
309-- | Convert Pandoc inline element to man.
305-- | Convert Pandoc inline element to man.
@@ -335,6 +331,8 @@ inlineToMan opts (Cite _ lst) =
335 inlineListToMan opts lst
331 inlineListToMan opts lst
336inlineToMan _ (Code _ str) =
332inlineToMan _ (Code _ str) =
337 return $ text $ "\\f[C]" ++ escapeCode str ++ "\\f[]"
333 return $ text $ "\\f[C]" ++ escapeCode str ++ "\\f[]"
334+inlineToMan _ (Str str@('.':_)) =
335+ return $ afterBreak "\\&" <> text (escapeString str)
338inlineToMan _ (Str str) = return $ text $ escapeString str
336inlineToMan _ (Str str) = return $ text $ escapeString str
339inlineToMan opts (Math InlineMath str) =
337inlineToMan opts (Math InlineMath str) =
340 inlineListToMan opts $ texMathToInlines InlineMath str
338 inlineListToMan opts $ texMathToInlines InlineMath str