diff --git a/adapters/compilers.coffee b/adapters/compilers.coffee index 448d161..2c661b9 100644 --- a/adapters/compilers.coffee +++ b/adapters/compilers.coffee @@ -48,6 +48,15 @@ module.exports = new Adapter throw err if err cb css + md: (file, cb) -> + marked = require 'marked' + + marked.setOptions Adapter.getOptions(this) + + file.read (code) -> + compiled = marked code + cb compiled + hbs: (file, cb) -> handlebars = require 'handlebars' diff --git a/test/compilers/markdown.spec.coffee b/test/compilers/markdown.spec.coffee new file mode 100644 index 0000000..7ab8916 --- /dev/null +++ b/test/compilers/markdown.spec.coffee @@ -0,0 +1,27 @@ +flour = require '../../flour' +should = require 'should' + +flour.silent() + +describe 'Markdown compiler', -> + + input_file = "#{dir.sources}/simple.md" + output_file = "#{dir.temp}/simple.html" + + it 'should compile markdown and return the output', (done) -> + flour.compile input_file, (output) -> + output.should.include """ +
Hello, paragraph.
+Hello, paragraph.
+