Skip to content

Commit

Permalink
Fix code span normalization....
Browse files Browse the repository at this point in the history
to conform to spec change.
  • Loading branch information
jgm committed Apr 5, 2019
1 parent 388d81d commit 5a8b529
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/inlines.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ var parseBackticks = function(block) {
contents = this.subject.slice(afterOpenTicks,
this.pos - ticks.length)
.replace(/\n/gm, ' ');
if (contents.length > 0 && contents[0] == ' ' &&
if (contents.length > 0 &&
contents.match(/[^ ]/) !== null &&
contents[0] == ' ' &&
contents[contents.length - 1] == ' ') {
node._literal = contents.slice(1, contents.length - 1);
} else {
Expand Down

0 comments on commit 5a8b529

Please sign in to comment.