diff --git a/Shake.hs b/Shake.hs index 191d2de8e..d3ee18177 100755 --- a/Shake.hs +++ b/Shake.hs @@ -84,8 +84,8 @@ main = do [ --- "tools" "pandoc-demote-headers" --- "tools" "pandoc-drop-html-blocks" - "tools" "pandoc-drop-html-inlines" - ,"tools" "pandoc-drop-links" + --- "tools" "pandoc-drop-html-inlines" + "tools" "pandoc-drop-links" ,"tools" "pandoc-drop-notes" ,"tools" "pandoc-drop-toc" ] @@ -205,7 +205,7 @@ main = do pandoc "-f markdown -s --template" tmpl -- "--filter tools/pandoc-drop-web-blocks" "--lua-filter tools/pandoc-drop-html-blocks.lua" - "--filter tools/pandoc-drop-html-inlines" + "--lua-filter tools/pandoc-drop-html-inlines.lua" "--filter tools/pandoc-drop-links" "--filter tools/pandoc-drop-notes" "-o" out @@ -233,7 +233,7 @@ main = do pandoc "-f markdown" -- "--filter tools/pandoc-drop-web-blocks" "--lua-filter tools/pandoc-drop-html-blocks.lua" - "--filter tools/pandoc-drop-html-inlines" + "--lua-filter tools/pandoc-drop-html-inlines.lua" "--filter tools/pandoc-drop-links" "--filter tools/pandoc-drop-notes" "-t texinfo |" diff --git a/tools/pandoc-drop-html-inlines.hs b/tools/pandoc-drop-html-inlines.hs deleted file mode 100755 index 90e7cfaa1..000000000 --- a/tools/pandoc-drop-html-inlines.hs +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env stack -{- stack runghc --verbosity info --package pandoc-types -} - -import Text.Pandoc.JSON - -main :: IO () -main = toJSONFilter dropHtmlInlines - -dropHtmlInlines :: Inline -> Inline -dropHtmlInlines (RawInline (Format "html") _) = Str "" -dropHtmlInlines x = x - diff --git a/tools/pandoc-drop-html-inlines.lua b/tools/pandoc-drop-html-inlines.lua new file mode 100644 index 000000000..595c917ed --- /dev/null +++ b/tools/pandoc-drop-html-inlines.lua @@ -0,0 +1,6 @@ +function RawInline(ri) + if ri.format == "html" + then return pandoc.Str("") + else return ri + end +end