Shake.hs, tools/pandoc-drop-notes: switch to lua script filter

This commit is contained in:
Everett Hildenbrandt 2018-04-21 16:26:18 -06:00 committed by Simon Michael
parent 364d3dc756
commit fbc9c63c62
3 changed files with 7 additions and 16 deletions

View File

@ -86,8 +86,8 @@ main = do
--- "tools" </> "pandoc-drop-html-blocks"
--- "tools" </> "pandoc-drop-html-inlines"
--- "tools" </> "pandoc-drop-links"
"tools" </> "pandoc-drop-notes"
,"tools" </> "pandoc-drop-toc"
--- "tools" </> "pandoc-drop-notes"
"tools" </> "pandoc-drop-toc"
]
shakeArgs
@ -207,7 +207,7 @@ main = do
"--lua-filter tools/pandoc-drop-html-blocks.lua"
"--lua-filter tools/pandoc-drop-html-inlines.lua"
"--lua-filter tools/pandoc-drop-links.lua"
"--filter tools/pandoc-drop-notes"
"--lua-filter tools/pandoc-drop-notes.lua"
"-o" out
-- render man page nroffs to fixed-width text for embedding in executables, with nroff
@ -235,7 +235,7 @@ main = do
"--lua-filter tools/pandoc-drop-html-blocks.lua"
"--lua-filter tools/pandoc-drop-html-inlines.lua"
"--lua-filter tools/pandoc-drop-links.lua"
"--filter tools/pandoc-drop-notes"
"--lua-filter tools/pandoc-drop-notes.lua"
"-t texinfo |"
makeinfo "--force --no-split -o" out

View File

@ -1,12 +0,0 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --package pandoc-types -}
import Text.Pandoc.JSON
main :: IO ()
main = toJSONFilter dropNotes
dropNotes :: Inline -> Inline
dropNotes (Note _) = Str ""
dropNotes x = x

View File

@ -0,0 +1,3 @@
function Note(nt)
return pandoc.Str("")
end