mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added some markdown
This commit is contained in:
parent
90aa7fb4cd
commit
c8edb8fcc7
2 changed files with 20 additions and 1 deletions
|
@ -7,8 +7,23 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
b {
|
b {
|
||||||
font-weight: 600;
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height: 1px;
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.green) {
|
||||||
|
color: $wisegreen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,11 @@ export const formatText = (text: string): string =>
|
||||||
)
|
)
|
||||||
.replace(/:\/\//gim, ':|--|')
|
.replace(/:\/\//gim, ':|--|')
|
||||||
.replace(/(\/\/[^\n]+)/gim, '<span class="grey">$1</span>')
|
.replace(/(\/\/[^\n]+)/gim, '<span class="grey">$1</span>')
|
||||||
|
.replace(/(\*\*[\s\S]*?\*\*)/gim, '<b class="bold white">$1</b>')
|
||||||
|
.replace(/(\_\_[\s\S]*?\_\_)/gim, '<i>$1</i>')
|
||||||
|
.replace(/(\!\![\s\S]*?(\!\!|\n|$))/gim, '<span class="green">$1</span>')
|
||||||
.replace(/(\/\*[\s\S]*?\*\/)/gim, '<span class="grey">$1</span>')
|
.replace(/(\/\*[\s\S]*?\*\/)/gim, '<span class="grey">$1</span>')
|
||||||
|
.replace(/([=|-]{5,})/gim, '<hr />')
|
||||||
.replace(/:\|--\|/gim, '://')
|
.replace(/:\|--\|/gim, '://')
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.filter(el => el.trim().length)
|
.filter(el => el.trim().length)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue