mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +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(/>/g, '>')
|
||||||
.replace(/:\/\//gim, ':|--|')
|
.replace(/:\/\//gim, ':|--|')
|
||||||
.replace(/(\/\/[^\n]+)/gim, '<span class="grey">$1</span>')
|
.replace(/(\/\/[^\n]+)/gim, '<span class="grey">$1</span>')
|
||||||
|
.replace(/(\/\*[\s\S]*?\*\/)/gim, '<span class="grey">$1</span>')
|
||||||
.replace(/:\|--\|/gim, '://')
|
.replace(/:\|--\|/gim, '://')
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map(el => `<p>${el}</p>`)
|
.map(el => `<p>${el}</p>`)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue