mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-19 02:06:08 +10:00
feat(emojify): add no-emoji option
This commit is contained in:
@@ -3,7 +3,7 @@ function replace (m, $1) {
|
||||
}
|
||||
|
||||
export function emojify (text) {
|
||||
return text
|
||||
return $docsify.noEmoji ? text : text
|
||||
.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g, m => m.replace(/:/g, '__colon__'))
|
||||
.replace(/:(\w+?):/ig, window.emojify || replace)
|
||||
.replace(/__colon__/g, ':')
|
||||
|
||||
Reference in New Issue
Block a user