diff options
Diffstat (limited to 'trypandoc')
-rw-r--r-- | trypandoc/index.html | 2 | ||||
-rw-r--r-- | trypandoc/trypandoc.hs | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/trypandoc/index.html b/trypandoc/index.html index 792f522eb..5761153c9 100644 --- a/trypandoc/index.html +++ b/trypandoc/index.html @@ -14,7 +14,7 @@ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <script> "use strict"; -(function($) { // http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values +(function($) { // https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values $.QueryString = (function(a) { if (a == "") return {}; var b = {}; diff --git a/trypandoc/trypandoc.hs b/trypandoc/trypandoc.hs index 9383c92ce..f2cc499c3 100644 --- a/trypandoc/trypandoc.hs +++ b/trypandoc/trypandoc.hs @@ -1,8 +1,7 @@ -{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {- | Module : Main - Copyright : © 2014-2020 John MacFarlane <jgm@berkeley.edu> + Copyright : © 2014-2021 John MacFarlane <jgm@berkeley.edu> License : GNU GPL, version 2 or above Maintainer : John MacFarlane <jgm@berkeley.edu> @@ -12,26 +11,22 @@ Provides a webservice which allows to try pandoc in the browser. -} module Main where -import Prelude import Network.Wai.Handler.CGI +import Network.Wai.Middleware.Timeout (timeout) import Network.Wai -import Control.Applicative ((<$>)) import Data.Maybe (fromMaybe) import Network.HTTP.Types.Status (status200) import Network.HTTP.Types.Header (hContentType) import Network.HTTP.Types.URI (queryToQueryText) import Text.Pandoc -import Text.Pandoc.Writers.Math (defaultMathJaxURL) import Text.Pandoc.Highlighting (pygments) -import Text.Pandoc.Readers (getReader, Reader(..)) -import Text.Pandoc.Writers (getWriter, Writer(..)) import Text.Pandoc.Shared (tabFilter) import Data.Aeson import qualified Data.Text as T import Data.Text (Text) main :: IO () -main = run app +main = run $ timeout 2 app app :: Application app req respond = do |