Fix fucking bug

This commit is contained in:
syuilo 2017-02-10 02:21:46 +09:00
parent 472c251f4e
commit cb2e78b7cb

View File

@ -140,7 +140,9 @@ const elements = [
// comment // comment
code => { code => {
if (code.substr(0, 2) != '//') return null; if (code.substr(0, 2) != '//') return null;
const comment = code.match(/^\/\/(.+?)\n/)[0]; const match = code.match(/^\/\/(.+?)\n/);
if (!match) return null;
const comment = match[0];
return { return {
html: `<span class="comment">${escape(comment)}</span>`, html: `<span class="comment">${escape(comment)}</span>`,
next: comment.length next: comment.length