mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
Update utils/ShowdownExtensions.ts
Co-authored-by: zero734kr <zero734kr@gmail.com>
This commit is contained in:
parent
9d1113d248
commit
c190dc2950
@ -21,7 +21,7 @@ export const anchorHeader = {
|
|||||||
|
|
||||||
export const twemoji = {
|
export const twemoji = {
|
||||||
type: 'output',
|
type: 'output',
|
||||||
regex: `${Emoji}{2}|${Emoji}`,
|
regex: `${Emoji}{1,2}`,
|
||||||
replace: function(__match: string, two: string, one: string) {
|
replace: function(__match: string, two: string, one: string) {
|
||||||
const parsed = __match || two || one
|
const parsed = __match || two || one
|
||||||
const emoj = Twemoji.parse(parsed, { folder: 'svg', ext: '.svg' })
|
const emoj = Twemoji.parse(parsed, { folder: 'svg', ext: '.svg' })
|
||||||
@ -38,4 +38,4 @@ export const customEmoji = {
|
|||||||
if(!name || !result) return `:${name}:`
|
if(!name || !result) return `:${name}:`
|
||||||
return `<img class="emoji special" draggable="false" alt="${name}" src="${result.imageUrl}"/>`
|
return `<img class="emoji special" draggable="false" alt="${name}" src="${result.imageUrl}"/>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user