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
This commit is contained in:
fiddlosopher 2009-12-07 23:34:54 +00:00
parent 5082b5411b
commit 0543698895
2 changed files with 2 additions and 68 deletions

View file

@ -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

View file

@ -439,45 +439,18 @@ sublist
.SH HTML Blocks
.PP
Simple block on one line:
<div>
foo
</div>
.PP
And nested without indentation:
<div>
<div>
<div>
foo
</div>
</div>
<div>
bar
</div>
</div>
.PP
Interpreted markdown in a table:
<table>
<tr>
<td>
This is \f[I]emphasized\f[]
</td>
<td>
And this is \f[B]strong\f[]
</td>
</tr>
</table>
<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
.PP
Here's a simple block:
<div>
foo
</div>
.PP
This should be a code block, though:
.PP
@ -494,30 +467,11 @@ As should this:
\f[]
.PP
Now, nested:
<div>
<div>
<div>
foo
</div>
</div>
</div>
.PP
This should just be an HTML comment:
<!-- Comment -->
.PP
Multiline:
<!--
Blah
Blah
-->
<!--
This is another comment.
-->
.PP
Code block:
.PP
@ -526,8 +480,6 @@ Code block:
\f[]
.PP
Just plain comment, with trailing spaces on the line:
<!-- foo -->
.PP
Code:
.PP
@ -536,24 +488,6 @@ Code:
\f[]
.PP
Hr's:
<hr>
<hr />
<hr />
<hr>
<hr />
<hr />
<hr class="foo" id="bar" />
<hr class="foo" id="bar" />
<hr class="foo" id="bar">
.PP
* * * * *
.SH Inline Markup