I think I may have figured it out
This commit is contained in:
@@ -19,7 +19,18 @@ convert = =>
|
||||
(md_source) ->
|
||||
filename = os.tmpname!
|
||||
write_exec md_source, @cmd, filename
|
||||
Path.read_file filename
|
||||
a = Path.read_file filename
|
||||
require("moon").p a
|
||||
a
|
||||
|
||||
-- fname = os.tmpname!
|
||||
-- with io.open fname, "w"
|
||||
-- \write md_source
|
||||
-- \close!
|
||||
--
|
||||
-- p = io.popen (@cmd)\format lang, fname
|
||||
-- out = p\read"*a"
|
||||
-- out
|
||||
|
||||
-- config command like this in site.moon:
|
||||
-- require("renderers.markdown").cmd = "pandoc --mathjax >"
|
||||
@@ -28,7 +39,11 @@ class PandocRenderer extends require "sitegen.renderers.markdown"
|
||||
escape_cosmo = @escape_cosmo
|
||||
pandoc = convert @
|
||||
|
||||
cmd: "pandoc >"
|
||||
-- cmd: "pandoc >"
|
||||
cmd: "pandoc --mathjax --lua-filter pygments.lua >"
|
||||
-- cmd: "pygmentize -f html -l %s %s"
|
||||
-- cmd: "pygmentize -f html -l %s %s -x"
|
||||
-- cmd: "pygmentize -f html -l moonscript.py test.moon -x -o lexer-test.html"
|
||||
|
||||
render: (page, md_source) =>
|
||||
md_source = page\pipe "renderer.markdown.pre_render", md_source
|
||||
|
||||
Reference in New Issue
Block a user