From 2fe815e47cf8c95d099ee0f17b2c4d83dc8dd2ce Mon Sep 17 00:00:00 2001 From: KoharaKazuya Date: Wed, 15 Apr 2015 20:40:57 +0900 Subject: [PATCH 1/2] Fix incorrect name for pandoc path option --- lib/langs/markdown-beautify.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/langs/markdown-beautify.coffee b/lib/langs/markdown-beautify.coffee index 60c7675..5b4dd46 100644 --- a/lib/langs/markdown-beautify.coffee +++ b/lib/langs/markdown-beautify.coffee @@ -7,7 +7,7 @@ allowUnsafeNewFunction = null getCmd = (inputPath, outputPath, options, cb) -> optionsStr = " --read markdown --write markdown --output \"" + outputPath + "\" \"" + inputPath + "\"" - pandocPath = options.markdown_beautifier_path # jshint ignore: line + pandocPath = options.pandoc_path # jshint ignore: line yamlFrontMatter = options.yaml_front_matter # jshint ignore: line cmd = "" if pandocPath? From 895515f6bd2a87772c447b954af2f753114de340 Mon Sep 17 00:00:00 2001 From: KoharaKazuya Date: Thu, 16 Apr 2015 07:45:45 +0900 Subject: [PATCH 2/2] Fix checking method for empty pandoc path option --- lib/langs/markdown-beautify.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/langs/markdown-beautify.coffee b/lib/langs/markdown-beautify.coffee index 5b4dd46..14cd340 100644 --- a/lib/langs/markdown-beautify.coffee +++ b/lib/langs/markdown-beautify.coffee @@ -10,12 +10,12 @@ getCmd = (inputPath, outputPath, options, cb) -> pandocPath = options.pandoc_path # jshint ignore: line yamlFrontMatter = options.yaml_front_matter # jshint ignore: line cmd = "" - if pandocPath? - # Use absolute path - cmd = pandocPath + optionsStr - else + if not pandocPath # Use command available in $PATH cmd = "pandoc" + optionsStr + else + # Use absolute path + cmd = pandocPath + optionsStr if yamlFrontMatter? # console.log("YAML Front Matter!")