Browse Source

use zero width space for combining text emojos

master
mark 1 year ago
parent
commit
1908a7191d
1 changed files with 13 additions and 6 deletions
  1. +13
    -6
      script.js

+ 13
- 6
script.js View File

@@ -33,19 +33,19 @@ function copyTextToClipboard(text) {
var replaceMapping = {
hacker: {
regexp: /[A-Za-z]/g,
replace: ":hacker_$&: ",
replace: ":hacker_$&:",
downcase: true
},
sm64: {
regexp: /[A-Za-z0-9'"]/g,
replace: ":sm64_$&: ",
postReplaceMatch: [/"/g, /'/g],
postReplace: ["dblquote", "quote"],
regexp: /[A-Za-z0-9'"\?]/g,
replace: ":sm64_$&:",
postReplaceMatch: [/"/g, /'/g, /\?/g],
postReplace: ["dblquote", "quote", "question"],
downcase: true
},
emoji: {
regexp: /[A-Za-z0-9#\*]/g,
replace: ":regional_indicator_$&: ",
replace: ":regional_indicator_$&:",
postReplaceMatch: [
/regional_indicator_0/g,
/regional_indicator_1/g,
@@ -85,6 +85,13 @@ var replaceMapping = {
postReplace: ["👏"],
downcase: false
},
bun: {
regexp: /\s/g,
replace: " :bun: ",
postReplaceMatch: [/$/],
postReplace: [" :bun: "],
downcase: false
},
spaced: {
regexp: /./g,
replace: "$& ",


Loading…
Cancel
Save