From 05436988950d271f8a55ee48b4d7794da9b40172 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Mon, 7 Dec 2009 23:34:54 +0000 Subject: [PATCH] Don't print raw HTML in man output. Resolves Issue #183. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1657 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/Man.hs | 4 +-- tests/writer.man | 66 ---------------------------------- 2 files changed, 2 insertions(+), 68 deletions(-) diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index 3270337d7..f6f656c4e 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -149,7 +149,7 @@ blockToMan opts (Para inlines) = do contents <- liftM vcat $ mapM (wrapIfNeeded opts (inlineListToMan opts)) $ splitSentences inlines return $ text ".PP" $$ contents -blockToMan _ (RawHtml str) = return $ text str +blockToMan _ (RawHtml _) = return empty blockToMan _ HorizontalRule = return $ text $ ".PP\n * * * * *" blockToMan opts (Header level inlines) = do contents <- inlineListToMan opts inlines @@ -312,7 +312,7 @@ inlineToMan opts (Math DisplayMath str) = do contents <- inlineToMan opts (Code str) return $ text ".RS" $$ contents $$ text ".RE" inlineToMan _ (TeX _) = return empty -inlineToMan _ (HtmlInline str) = return $ text $ escapeCode str +inlineToMan _ (HtmlInline _) = return empty inlineToMan _ (LineBreak) = return $ text "\n.PD 0\n.P\n.PD\n" inlineToMan _ Space = return $ char ' ' inlineToMan opts (Link txt (src, _)) = do diff --git a/tests/writer.man b/tests/writer.man index aa3cbf647..692f8f036 100644 --- a/tests/writer.man +++ b/tests/writer.man @@ -439,45 +439,18 @@ sublist .SH HTML Blocks .PP Simple block on one line: -
foo -
- .PP And nested without indentation: -
-
-
foo -
-
-
bar -
-
- .PP Interpreted markdown in a table: - - - - - -
This is \f[I]emphasized\f[] - And this is \f[B]strong\f[] -
- - - .PP Here's a simple block: -
- foo -
- .PP This should be a code block, though: .PP @@ -494,30 +467,11 @@ As should this: \f[] .PP Now, nested: -
-
-
- foo -
-
-
- .PP This should just be an HTML comment: - - .PP Multiline: - - - - .PP Code block: .PP @@ -526,8 +480,6 @@ Code block: \f[] .PP Just plain comment, with trailing spaces on the line: - - .PP Code: .PP @@ -536,24 +488,6 @@ Code: \f[] .PP Hr's: -
- -
- -
- -
- -
- -
- -
- -
- -
- .PP * * * * * .SH Inline Markup