|
|
@ -13,7 +13,7 @@ var defaults = require('./defaults'); |
|
|
|
|
|
|
|
// Main class
|
|
|
|
//
|
|
|
|
function Parser(options) { |
|
|
|
function Remarkable(options) { |
|
|
|
this.options = assign({}, defaults); |
|
|
|
this.state = null; |
|
|
|
|
|
|
@ -29,12 +29,12 @@ function Parser(options) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Parser.prototype.set = function (options) { |
|
|
|
Remarkable.prototype.set = function (options) { |
|
|
|
assign(this.options, options); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Parser.prototype.render = function (src) { |
|
|
|
Remarkable.prototype.render = function (src) { |
|
|
|
var tokens, tok, i, l, env = { references: Object.create(null) }; |
|
|
|
|
|
|
|
// Parse blocks
|
|
|
@ -53,4 +53,4 @@ Parser.prototype.render = function (src) { |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
module.exports = Parser; |
|
|
|
module.exports = Remarkable; |