From c1825a1b1cfb019e20d5a2d4d7955e4c8633f94c Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Thu, 7 Nov 2019 16:14:37 +0700 Subject: [PATCH] highlight multiline comments --- src/utils/dom.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/dom.ts b/src/utils/dom.ts index 7a18871a..af696535 100644 --- a/src/utils/dom.ts +++ b/src/utils/dom.ts @@ -81,6 +81,7 @@ export const formatText = (text: string): string => .replace(/>/g, '>') .replace(/:\/\//gim, ':|--|') .replace(/(\/\/[^\n]+)/gim, '$1') + .replace(/(\/\*[\s\S]*?\*\/)/gim, '$1') .replace(/:\|--\|/gim, '://') .split('\n') .map(el => `

${el}

`)