aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-23 23:20:54 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-23 23:20:54 +0000
commit3de1f19b435695a7312f015d30316442b493ebd9 (patch)
treeb01e42d5e311bd5515d62159792a8b31b368a7bd
parent7bf966f934e45af4d2b8f6264fa26ea5fdbbe218 (diff)
downloadpandoc-3de1f19b435695a7312f015d30316442b493ebd9.tar.gz
Removed incorrect "{}" around style information in
HTML tables. Adjusted test suite accordingly. Column widths now work properly in HTML. git-svn-id: https://pandoc.googlecode.com/svn/trunk@882 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs4
-rw-r--r--tests/tables.html40
2 files changed, 22 insertions, 22 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index cad0915df..e234b7fca 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -347,8 +347,8 @@ tableItemToHtml opts tag align' width item = do
contents <- blockListToHtml opts item
let attrib = [align align'] ++
if width /= 0
- then [thestyle ("{width: " ++ show (truncate (100*width)) ++
- "%;}")]
+ then [thestyle ("width: " ++ show (truncate (100*width)) ++
+ "%;")]
else []
return $ tag ! attrib $ contents
diff --git a/tests/tables.html b/tests/tables.html
index 43a0fb182..7ae87b024 100644
--- a/tests/tables.html
+++ b/tests/tables.html
@@ -4,13 +4,13 @@
><caption
>Demonstration of simple table syntax.</caption
><tr
- ><th align="right" style="{width: 15%;}"
+ ><th align="right" style="width: 15%;"
>Right</th
- ><th align="left" style="{width: 8%;}"
+ ><th align="left" style="width: 8%;"
>Left</th
- ><th align="center" style="{width: 16%;}"
+ ><th align="center" style="width: 16%;"
>Center</th
- ><th align="left" style="{width: 12%;}"
+ ><th align="left" style="width: 12%;"
>Default</th
></tr
><tr
@@ -48,13 +48,13 @@
>Simple table without caption:</p
><table
><tr
- ><th align="right" style="{width: 15%;}"
+ ><th align="right" style="width: 15%;"
>Right</th
- ><th align="left" style="{width: 8%;}"
+ ><th align="left" style="width: 8%;"
>Left</th
- ><th align="center" style="{width: 16%;}"
+ ><th align="center" style="width: 16%;"
>Center</th
- ><th align="left" style="{width: 12%;}"
+ ><th align="left" style="width: 12%;"
>Default</th
></tr
><tr
@@ -94,13 +94,13 @@
><caption
>Demonstration of simple table syntax.</caption
><tr
- ><th align="right" style="{width: 15%;}"
+ ><th align="right" style="width: 15%;"
>Right</th
- ><th align="left" style="{width: 8%;}"
+ ><th align="left" style="width: 8%;"
>Left</th
- ><th align="center" style="{width: 16%;}"
+ ><th align="center" style="width: 16%;"
>Center</th
- ><th align="left" style="{width: 12%;}"
+ ><th align="left" style="width: 12%;"
>Default</th
></tr
><tr
@@ -140,13 +140,13 @@
><caption
>Here's the caption. It may span multiple lines.</caption
><tr
- ><th align="center" style="{width: 15%;}"
+ ><th align="center" style="width: 15%;"
>Centered Header</th
- ><th align="left" style="{width: 13%;}"
+ ><th align="left" style="width: 13%;"
>Left Aligned</th
- ><th align="right" style="{width: 16%;}"
+ ><th align="right" style="width: 16%;"
>Right Aligned</th
- ><th align="left" style="{width: 33%;}"
+ ><th align="left" style="width: 33%;"
>Default aligned</th
></tr
><tr
@@ -174,13 +174,13 @@
>Multiline table without caption:</p
><table
><tr
- ><th align="center" style="{width: 15%;}"
+ ><th align="center" style="width: 15%;"
>Centered Header</th
- ><th align="left" style="{width: 13%;}"
+ ><th align="left" style="width: 13%;"
>Left Aligned</th
- ><th align="right" style="{width: 16%;}"
+ ><th align="right" style="width: 16%;"
>Right Aligned</th
- ><th align="left" style="{width: 33%;}"
+ ><th align="left" style="width: 33%;"
>Default aligned</th
></tr
><tr