Merge pull request #714 from patrl/pandoc

Added basic +pandoc feature to markdown module
This commit is contained in:
Henrik Lissner 2018-06-23 19:44:54 +02:00 committed by GitHub
commit f602a1f607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View file

@ -3,6 +3,9 @@
(def-package! markdown-mode
:mode ("/README\\(?:\\.\\(?:markdown\\|md\\)\\)?\\'" . gfm-mode)
:init
(when (featurep! +pandoc)
(setq markdown-command "pandoc --from=markdown --to=html --standalone --mathjax --highlight-style=pygments"))
(setq markdown-enable-wiki-links t
markdown-italic-underscore t
markdown-asymmetric-header t
@ -47,3 +50,10 @@
:nv "t" #'markdown-toc-generate-toc
:nv "i" #'markdown-insert-image
:nv "l" #'markdown-insert-link)))
(def-package! pandoc-mode
:when (featurep! +pandoc)
:commands
pandoc-mode
:hook
(markdown-mode . conditionally-turn-on-pandoc))

View file

@ -0,0 +1,6 @@
;; -*- lexical-binding: t; no-byte-compile: t; -*-
;;; lang/markdown/doctor.el
(when (featurep! +pandoc)
(unless (executable-find "pandoc")
(warn! "Couldn't find pandoc, markdown-mode may have issues"))

View file

@ -4,3 +4,7 @@
(package! markdown-mode)
(package! markdown-toc)
(when (featurep! +pandoc)
(package! pandoc-mode))