implement normalizing markdown through pandoc
This commit is contained in:
parent
30e8ce5971
commit
ad662271c1
|
@ -12,3 +12,4 @@ before_install:
|
|||
- gem install ruby-beautify --verbose
|
||||
- brew install python
|
||||
- pip install --upgrade autopep8
|
||||
- cabal install pandoc
|
||||
|
|
|
@ -191,6 +191,11 @@ and that you set the `Python autopep8 path` in the package settings.
|
|||
|
||||
Run `which autopep8` in your Terminal.
|
||||
|
||||
### Markdown
|
||||
|
||||
To use with Markdown we require [pandoc](http://johnmacfarlane.net/pandoc/)
|
||||
and you set the `Markdown Pandoc path` in the package settings.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
###
|
||||
Requires http: //johnmacfarlane.net/pandoc/
|
||||
###
|
||||
getCmd = (inputPath, outputPath, options) ->
|
||||
optionsStr = " --read markdown --write markdown --output \"" + outputPath + "\" \"" + inputPath + "\""
|
||||
|
||||
pandocPath = options.markdown_beautifier_path # jshint ignore: line
|
||||
if pandocPath
|
||||
|
||||
# Use absolute path
|
||||
pandocPath + optionsStr
|
||||
else
|
||||
|
||||
# Use command available in $PATH
|
||||
"pandoc" + optionsStr
|
||||
"use strict"
|
||||
cliBeautify = require("./cli-beautify")
|
||||
module.exports = cliBeautify(getCmd)
|
|
@ -17,6 +17,7 @@ beautifyLESS = null
|
|||
beautifyCoffeeScript = null
|
||||
uncrustifyBeautifier = null
|
||||
beautifyHTMLERB = null
|
||||
beautifyMarkdown = null
|
||||
|
||||
# Misc
|
||||
Analytics = require("analytics-node")
|
||||
|
@ -40,6 +41,7 @@ module.exports =
|
|||
"c"
|
||||
"cpp"
|
||||
"cs"
|
||||
"markdown"
|
||||
"objectivec"
|
||||
"java"
|
||||
"d"
|
||||
|
@ -86,6 +88,9 @@ module.exports =
|
|||
sql_keywords: "upper"
|
||||
sql_identifiers: "lower"
|
||||
sql_sqlformat_path: ""
|
||||
|
||||
# Markdown
|
||||
markdown_pandoc_path: ""
|
||||
|
||||
# PHP
|
||||
php_beautifier_path: ""
|
||||
|
@ -179,6 +184,9 @@ module.exports =
|
|||
when "Ruby"
|
||||
beautifyRuby ?= require("./langs/ruby-beautify")
|
||||
beautifyRuby text, self.getOptions("ruby", allOptions), beautifyCompleted
|
||||
when "GitHub Markdown"
|
||||
beautifyMarkdown ?= require("./langs/markdown-beautify")
|
||||
beautifyMarkdown text, self.getOptions("markdown", allOptions), beautifyCompleted
|
||||
when "C"
|
||||
options = self.getOptions("c", allOptions)
|
||||
options.languageOverride = "C"
|
||||
|
@ -273,7 +281,7 @@ module.exports =
|
|||
# console.log(selection, currOptions[selection]);
|
||||
_.merge collectedConfig, currOptions[selection]
|
||||
extend result, collectedConfig
|
||||
, {})
|
||||
, {} )
|
||||
# TODO: Clean.
|
||||
# There is a bug in nopt
|
||||
# See https://github.com/npm/nopt/issues/38#issuecomment-45971505
|
||||
|
|
41
package.json
41
package.json
|
@ -17,29 +17,23 @@
|
|||
"email": "glavin.wiechert@gmail.com",
|
||||
"url": "https://github.com/Glavin001"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Donald Pipowitch",
|
||||
"email": "pipo@senaeh.de",
|
||||
"url": "https://github.com/donaldpipowitch"
|
||||
},
|
||||
{
|
||||
"name": "László Károlyi",
|
||||
"url": "https://github.com/karolyi"
|
||||
},
|
||||
{
|
||||
"name": "Marco Tanzi",
|
||||
"url": "https://github.com/mtanzi"
|
||||
},
|
||||
{
|
||||
"name": "gvn lazar suntop",
|
||||
"url": "https://github.com/gvn"
|
||||
},
|
||||
{
|
||||
"name": "Vadim K.",
|
||||
"url": "https://github.com/vadirn"
|
||||
}
|
||||
],
|
||||
"contributors": [{
|
||||
"name": "Donald Pipowitch",
|
||||
"email": "pipo@senaeh.de",
|
||||
"url": "https://github.com/donaldpipowitch"
|
||||
}, {
|
||||
"name": "László Károlyi",
|
||||
"url": "https://github.com/karolyi"
|
||||
}, {
|
||||
"name": "Marco Tanzi",
|
||||
"url": "https://github.com/mtanzi"
|
||||
}, {
|
||||
"name": "gvn lazar suntop",
|
||||
"url": "https://github.com/gvn"
|
||||
}, {
|
||||
"name": "Vadim K.",
|
||||
"url": "https://github.com/vadirn"
|
||||
}],
|
||||
"keywords": [
|
||||
"atom",
|
||||
"beautify",
|
||||
|
@ -58,6 +52,7 @@
|
|||
"scss",
|
||||
"less",
|
||||
"sql",
|
||||
"markdown",
|
||||
"php",
|
||||
"python",
|
||||
"ruby",
|
||||
|
|
Loading…
Reference in New Issue