Browse Source

simplified a function

main
Jesse Laprade 1 week ago
parent
commit
3c3630fc5b
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      src/wg.fnl

+ 6
- 5
src/wg.fnl View File

@ -158,11 +158,12 @@
;; Note: source and destination should both be full paths starting from
;; where wg.fnl is ran
(fn markdown->html [source destination]
(let [header (. files-required :header)
footer (. files-required :footer)
input (string.format "%s %s %s" header source footer)
pandoc-cmd "pandoc -s -c /style.css %s -o %s --base-header-level=2"]
(os.execute (string.format pandoc-cmd input destination))))
(os.execute
(string.format "pandoc -s -c /style.css %s %s %s -o %s --base-header-level=2"
(. files-required :header)
source
(. files-required :footer)
destination)))
(fn build/convert [dir]
(each [_ v (ipairs (ffs.directory-contents dir))]

Loading…
Cancel
Save