mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 04:03:07 +02:00
Fix fucking bug
This commit is contained in:
parent
472c251f4e
commit
cb2e78b7cb
1 changed files with 3 additions and 1 deletions
|
@ -140,7 +140,9 @@ const elements = [
|
|||
// comment
|
||||
code => {
|
||||
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 {
|
||||
html: `<span class="comment">${escape(comment)}</span>`,
|
||||
next: comment.length
|
||||
|
|
Loading…
Reference in a new issue