Skip to content

Commit

Permalink
Trim inline code. Fixes #69.
Browse files Browse the repository at this point in the history
The inline code regex itself could also simply have \s* prepended
and appended to outside the main capture. However, this results
in less accurate behavior.
  • Loading branch information
chjj committed Jan 9, 2013
1 parent ebc1b94 commit 48e766a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ InlineLexer.prototype.output = function(src) {
if (cap = this.rules.code.exec(src)) {
src = src.substring(cap[0].length);
out += '<code>'
+ escape(cap[2], true)
+ escape(cap[2].trim(), true)
+ '</code>';
continue;
}
Expand Down

0 comments on commit 48e766a

Please sign in to comment.