anammari / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Skip table tags in html on Vista #172

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Write a small html document:

<html>
<table border width="100%">
<thead><td>1<td>2</thead>
<tr><td>3<td>4</tr>
</table>
</html>

2. run "pandoc -f html -t html index.html
3. get a value "1234"

What is the expected output? What do you see instead?
Expected table (get it from http://johnmacfarlane.net/pandoc/try):

<table border
width="100%"><thead><td>1<td>2</thead><tr><td>3<td>4</tr></table><!--
unsafe HTML removed -->

What version of the product are you using? On what operating system?
pandoc 1.2.1
Windows Vista basic 32bit

Please provide any additional information below.

Original issue reported on code.google.com by nushenk...@gmail.com on 23 Oct 2009 at 11:22

GoogleCodeExporter commented 8 years ago
Use "pandoc -f html -t html -R" and you will get the output you expect.

By default, in parsing html or latex, pandoc will ignore constructs that
don't correspond to standard markdown constructs (that includes tables,
since tables are a pandoc extension).  If you specify -R/--parse-raw,
it will instead pass these through as raw html or latex.

Original comment by fiddloso...@gmail.com on 23 Oct 2009 at 11:00

GoogleCodeExporter commented 8 years ago
Ok. It's work with HTML output, but when I try to use "pandoc -f html -t odt -R 
-o
2.odt" or "pandoc -f html -t rtf -s -o 1.rtf" I get digits without table.

Original comment by nushenk...@gmail.com on 30 Oct 2009 at 4:24

GoogleCodeExporter commented 8 years ago
Raw HTML doesn't make sense in RTF output, so the writer doesn't include it, 
even if
you specify -R.

Sounds like you need a way to convert simple HTML tables to pandoc/markdown 
tables,
which could then be converted to RTF or other formats.  Someone posted a perl 
script
that converts HTML tables to pandoc-markdown format in the discussion of this 
issue:
might be useful to you.
http://code.google.com/p/pandoc/issues/detail?id=132

Original comment by fiddloso...@gmail.com on 30 Oct 2009 at 7:35