Awkee / pandoc

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

writerStandalone for html output broken? #226

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

run the file:

import Text.Pandoc

t :: String
t = "test stuff"

main :: IO ()
main = do
  let a = doit defaultWriterOptions t
  let b = doit (defaultWriterOptions {writerStandalone = True}) t
  putStrLn $ "a:\n" ++ a ++ "\nb:\n" ++ b
  where
    doit wopt = (writeHtmlString wopt) . (readMarkdown defaultParserState)

What is the expected output? 

with pandoc-1.3, I get:

a:
<p
>test stuff</p
>
b:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
><head
  ><title
    ></title
    ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
     /><meta name="generator" content="pandoc"
     /></head
  ><body
  ><p
    >test stuff</p
    ></body
  ></html
>

What do you see instead?
with pandoc-1.5.1.1 I get:

a:
<p
>test stuff</p
>
b:

- so writeHtmlString with writerStandalone = True produces an empty string 
instead of the expected html

Original issue reported on code.google.com by jakewhea...@gmail.com on 31 Mar 2010 at 3:03

GoogleCodeExporter commented 9 years ago
This is a duplicate of issue 218, so see there for the fix:
http://code.google.com/p/pandoc/issues/detail?id=218

Original comment by fiddloso...@gmail.com on 31 Mar 2010 at 3:43

GoogleCodeExporter commented 9 years ago
Thank you for the quick reply, and sorry for the duplicate.

Original comment by jakewhea...@gmail.com on 1 Apr 2010 at 1:49