mirror of
https://github.com/fmhy/edit.git
synced 2026-01-18 01:41:52 +11:00
Update transformer.ts
Gitlab icons (i hope there exists mdi:gitlab)
This commit is contained in:
parent
1441da895d
commit
92f4a023a3
1 changed files with 10 additions and 0 deletions
|
|
@ -383,5 +383,15 @@ function transformLinks(text: string): string {
|
|||
/\[Telegram\]\(([^\)]*?)\)/gm,
|
||||
'<a target="_blank" href="$1"><div alt="Telegram" class="i-mdi:telegram" /></a>'
|
||||
)
|
||||
// Transform Gitlab links to icons
|
||||
.replace(
|
||||
/\[GitLab\]\(([^\)]*?)\)/gm,
|
||||
'<a target="_blank" href="$1"><div alt="GitLab" class="i-mdi:gitlab" /></a>'
|
||||
)
|
||||
// Fallback for GitHub
|
||||
.replace(
|
||||
/\[Gitlab\]\(([^\)]*?)\)/gm,
|
||||
'<a target="_blank" href="$1"><div alt="GitLab" class="i-mdi:gitlab" /></a>'
|
||||
)
|
||||
return _text
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue