@ -57,7 +57,7 @@ module.exports = function parse_reference(str, parser, options, env) {
}
// ensure that the end of the line is empty
pos = state.skipSpaces(pos);
while (pos < max && state.src.charCodeAt(pos) === 0x20/* space */) { pos++; }
if (pos < max && state.src.charCodeAt(pos) !== 0x0A) { return -1; }
label = normalizeReference(str.slice(1, labelEnd));
@ -42,11 +42,5 @@ StateInline.prototype.push = function (token) {
this.pendingLevel = this.level;
};
StateInline.prototype.skipSpaces = function skipSpaces(pos) {
for (var max = this.src.length; pos < max; pos++) {
if (this.src.charCodeAt(pos) !== 0x20/* space */) { break; }
return pos;
module.exports = StateInline;