diff --git a/src/common/text/elements/code.js b/src/common/text/elements/code.js index bda3816a7b..23074741af 100644 --- a/src/common/text/elements/code.js +++ b/src/common/text/elements/code.js @@ -101,6 +101,16 @@ const elements = [ }; }, + // block comment + code => { + const match = code.match(/^\/\*([\s\S]+?)\*\//); + if (!match) return null; + return { + html: `${escape(match[0])}`, + next: match[0].length + }; + }, + // string code => { if (!/^['"`]/.test(code)) return null;