mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
highlight multiline comments
This commit is contained in:
parent
f0acb1ee66
commit
c1825a1b1c
1 changed files with 1 additions and 0 deletions
|
@ -81,6 +81,7 @@ export const formatText = (text: string): string =>
|
|||
.replace(/>/g, '>')
|
||||
.replace(/:\/\//gim, ':|--|')
|
||||
.replace(/(\/\/[^\n]+)/gim, '<span class="grey">$1</span>')
|
||||
.replace(/(\/\*[\s\S]*?\*\/)/gim, '<span class="grey">$1</span>')
|
||||
.replace(/:\|--\|/gim, '://')
|
||||
.split('\n')
|
||||
.map(el => `<p>${el}</p>`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue