mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
Shake.hs, tools/pandoc-drop-notes: switch to lua script filter
This commit is contained in:
parent
364d3dc756
commit
fbc9c63c62
8
Shake.hs
8
Shake.hs
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
3
tools/pandoc-drop-notes.lua
Normal file
3
tools/pandoc-drop-notes.lua
Normal file
@ -0,0 +1,3 @@
|
||||
function Note(nt)
|
||||
return pandoc.Str("")
|
||||
end
|
Loading…
Reference in New Issue
Block a user