git.iko.soy/typeable/pandoc
on master help sign in
trypandoc: call results 'html' instead of 'result'.
43382ceJohn MacFarlane
trypandoc/index.html+1−1
@@ -39,7 +39,7 @@ $(document).ready(function() {
39 if (text && text != "") {
39 if (text && text != "") {
40 $.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text },
40 $.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text },
41 function(res) {
41 function(res) {
42− $("#results").text(res.result);
42+ $("#results").text(res.html);
43 $("#version").text(res.version);
43 $("#version").text(res.version);
44 $("#command").text("pandoc --from " + from + " --to " + to);
44 $("#command").text("pandoc --from " + from + " --to " + to);
45 });
45 });
trypandoc/trypandoc.hs+1−1
@@ -33,7 +33,7 @@ app req respond = do
33 let result = case reader $ tabFilter 4 $ T.unpack text of
33 let result = case reader $ tabFilter 4 $ T.unpack text of
34 Right doc -> T.pack $ writer doc
34 Right doc -> T.pack $ writer doc
35 Left err -> error (show err)
35 Left err -> error (show err)
36− let output = encode $ object [ T.pack "result" .= result
36+ let output = encode $ object [ T.pack "html" .= result
37 , T.pack "name" .=
37 , T.pack "name" .=
38 if fromFormat == "markdown_strict"
38 if fromFormat == "markdown_strict"
39 then T.pack "pandoc (strict)"
39 then T.pack "pandoc (strict)"