Skip to content

Commit

Permalink
Inline lexer must pass encode argument to escape()
Browse files Browse the repository at this point in the history
The the escape method for InlineLexer did not take a second argument.  The escape method underlying it accepts this argument.  For certain things like inline code, this argument needs to be passed for things to work as expected (e.g. inline code should have `&` escaped).
  • Loading branch information
aepstein committed Feb 9, 2015
1 parent 1d70a18 commit e7a3002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/kramed.js
Expand Up @@ -599,12 +599,12 @@ InlineLexer.output = function(src, links, options) {
return inline.output(src);
};

InlineLexer.prototype.escape = function(html) {
InlineLexer.prototype.escape = function(html, encode) {
// Handle escaping being turned off
if(this.options && this.options.escape === false) {
return html;
}
return escape(html);
return escape(html, encode);
};

/**
Expand Down

0 comments on commit e7a3002

Please sign in to comment.