lang/markdown: add multimarkdown compiler support
This commit is contained in:
parent
b1e23238e6
commit
768ebda95b
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue