diff options
-rw-r--r-- | src/Text/Pandoc/Writers/Man.hs | 4 | ||||
-rw-r--r-- | test/writer.man | 38 |
2 files changed, 3 insertions, 39 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index d2803f06f..645476b77 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -253,7 +253,9 @@ definitionListItemToMan opts (label, defs) = do rest' <- liftM vcat $ mapM (\item -> blockToMan opts item) xs return $ first' $$ - text ".RS" $$ rest' $$ text ".RE" + if null xs + then empty + else text ".RS" $$ rest' $$ text ".RE" [] -> return empty return $ text ".TP" $$ nowrap (text ".B " <> labelText) $$ contents diff --git a/test/writer.man b/test/writer.man index ce9f3a23f..33cb576ff 100644 --- a/test/writer.man +++ b/test/writer.man @@ -320,52 +320,34 @@ Tight using spaces: .TP .B apple red fruit -.RS -.RE .TP .B orange orange fruit -.RS -.RE .TP .B banana yellow fruit -.RS -.RE .PP Tight using tabs: .TP .B apple red fruit -.RS -.RE .TP .B orange orange fruit -.RS -.RE .TP .B banana yellow fruit -.RS -.RE .PP Loose: .TP .B apple red fruit -.RS -.RE .TP .B orange orange fruit -.RS -.RE .TP .B banana yellow fruit -.RS -.RE .PP Multiple blocks with italics: .TP @@ -395,47 +377,27 @@ Multiple definitions, tight: .TP .B apple red fruit -.RS -.RE computer -.RS -.RE .TP .B orange orange fruit -.RS -.RE bank -.RS -.RE .PP Multiple definitions, loose: .TP .B apple red fruit -.RS -.RE computer -.RS -.RE .TP .B orange orange fruit -.RS -.RE bank -.RS -.RE .PP Blank line after term, indented marker, alternate markers: .TP .B apple red fruit -.RS -.RE computer -.RS -.RE .TP .B orange orange fruit |