diff --git a/sublime-text-markmon.sublime-settings b/sublime-text-markmon.sublime-settings index 5cb62b3..b2d71b5 100644 --- a/sublime-text-markmon.sublime-settings +++ b/sublime-text-markmon.sublime-settings @@ -3,6 +3,7 @@ //If markmon is not on your path you'll need to use a full path to it "executable": "markmon", "port": 3002, + "pandoc_path": "", "command": "pandoc -t HTML5 --mathjax", "stylesheet": null, "projectdir": null diff --git a/util.py b/util.py index e45a746..3e41bf4 100644 --- a/util.py +++ b/util.py @@ -269,6 +269,11 @@ def create_environment(): if paths: env['PATH'] = os.pathsep.join(paths) + os.pathsep + env['PATH'] + pandoc = sublime.load_settings( + 'sublime-text-markmon.sublime-settings').get("pandoc_path", None) + if pandoc: + env['PATH'] = pandoc + os.pathsep + env['PATH'] + # Many linters use stdin, and we convert text to utf-8 # before sending to stdin, so we have to make sure stdin # in the target executable is looking for utf-8.