aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/SelfContained.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/SelfContained.hs')
-rw-r--r--src/Text/Pandoc/SelfContained.hs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs
index 9c609b8fe..9332a3fa0 100644
--- a/src/Text/Pandoc/SelfContained.hs
+++ b/src/Text/Pandoc/SelfContained.hs
@@ -157,6 +157,16 @@ makeSelfContained :: Maybe FilePath -> String -> IO String
makeSelfContained userdata inp = do
let tags = parseTags inp
out' <- mapM (convertTag userdata) tags
- return $ renderTagsOptions renderOptions{ optMinimize = (\t -> t == "br"
- || t == "img" || t == "meta" || t == "link" ) } out'
+ return $ renderTags' out'
+-- repeated from HTML reader:
+renderTags' :: [Tag String] -> String
+renderTags' = renderTagsOptions
+ renderOptions{ optMinimize = \x ->
+ let y = map toLower x
+ in y == "hr" || y == "br" ||
+ y == "img" || y == "meta" ||
+ y == "link"
+ , optRawTag = \x ->
+ let y = map toLower x
+ in y == "script" || y == "style" }