lang/markdown: add multimarkdown compiler support

This commit is contained in:
Henrik Lissner 2019-05-21 17:14:52 -04:00
parent b1e23238e6
commit 768ebda95b
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395
2 changed files with 12 additions and 1 deletions

View File

@ -75,6 +75,16 @@ Returns its exit code."
"pandoc" "-f" "markdown" "-t" "html" "pandoc" "-f" "markdown" "-t" "html"
"--standalone" "--mathjax" "--highlight-style=pygments"))) "--standalone" "--mathjax" "--highlight-style=pygments")))
;;;###autoload
(defun +markdown-compile-multimarkdown (beg end output-buffer)
"Compiles markdown with the multimarkdown program, if available. Returns its
exit code."
(when (executable-find "multimarkdown")
(call-process-region beg end
shell-file-name nil output-buffer nil
shell-command-switch
"multimarkdown")))
;;;###autoload ;;;###autoload
(defun +markdown-compile-markdown (beg end output-buffer) (defun +markdown-compile-markdown (beg end output-buffer)
"Compiles markdown using the Markdown.pl script (or markdown executable), if "Compiles markdown using the Markdown.pl script (or markdown executable), if

View File

@ -3,7 +3,8 @@
(defvar +markdown-compile-functions (defvar +markdown-compile-functions
'(+markdown-compile-marked '(+markdown-compile-marked
+markdown-compile-pandoc +markdown-compile-pandoc
+markdown-compile-markdown) +markdown-compile-markdown
+markdown-compile-multimarkdown)
"A list of commands to try when attempting to build a markdown file with "A list of commands to try when attempting to build a markdown file with
`markdown-open' or `markdown-preview', stopping at the first one to return non-nil. `markdown-open' or `markdown-preview', stopping at the first one to return non-nil.