Cast remark's vfile to string
Another change on the API was the change of the return type. It now return a vfile instead of a string.
Old:
d1c52a3b28/doc/remark.3.md (remarkprocessfile-options-done)
New:
https://github.com/wooorm/unified#processorprocessfilevalue-options-done
This commit is contained in:
parent
0c28d39fe6
commit
288c11a5eb
|
@ -36,7 +36,7 @@ module.exports = class Remark extends Beautifier
|
||||||
return new @Promise((resolve, reject) ->
|
return new @Promise((resolve, reject) ->
|
||||||
try
|
try
|
||||||
remark = require 'remark'
|
remark = require 'remark'
|
||||||
cleanMarkdown = remark().process(text, options)
|
cleanMarkdown = remark().process(text, options).toString()
|
||||||
resolve cleanMarkdown
|
resolve cleanMarkdown
|
||||||
catch err
|
catch err
|
||||||
@error("Remark error: #{err}")
|
@error("Remark error: #{err}")
|
||||||
|
|
Loading…
Reference in New Issue