|
@ -514,6 +514,10 @@ MarkdownIt.prototype.use = function (plugin /*, params, ... */) { |
|
|
* and then pass updated object to renderer. |
|
|
* and then pass updated object to renderer. |
|
|
**/ |
|
|
**/ |
|
|
MarkdownIt.prototype.parse = function (src, env) { |
|
|
MarkdownIt.prototype.parse = function (src, env) { |
|
|
|
|
|
if (typeof src !== 'string') { |
|
|
|
|
|
throw new Error('Input data should be a String'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var state = new this.core.State(src, this, env); |
|
|
var state = new this.core.State(src, this, env); |
|
|
|
|
|
|
|
|
this.core.process(state); |
|
|
this.core.process(state); |
|
|