lang/markdown: generalize markdown compile fn
So it can be used with the original perl script, discout, or the renamed executable on MacOS.
This commit is contained in:
parent
ece2f86480
commit
b1e23238e6
1 changed files with 5 additions and 4 deletions
|
@ -77,10 +77,11 @@ Returns its exit code."
|
|||
|
||||
;;;###autoload
|
||||
(defun +markdown-compile-markdown (beg end output-buffer)
|
||||
"Compiles markdown using the markdown program, if available.
|
||||
Returns its exit code."
|
||||
(when (executable-find "markdown")
|
||||
"Compiles markdown using the Markdown.pl script (or markdown executable), if
|
||||
available. Returns its exit code."
|
||||
(when-let* ((exe (or (executable-find "Markdown.pl")
|
||||
(executable-find "markdown"))))
|
||||
(call-process-region beg end
|
||||
shell-file-name nil output-buffer nil
|
||||
shell-command-switch
|
||||
"markdown")))
|
||||
exe)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue