fix encoding order
This commit is contained in:
parent
3b75d441f0
commit
ba96fd0869
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cuffeo",
|
"name": "cuffeo",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "A multi-protocol chatbot library with nearly zero dependencies.",
|
"description": "A multi-protocol chatbot library with nearly zero dependencies.",
|
||||||
"main": "src/index.mjs",
|
"main": "src/index.mjs",
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
|
|
|
@ -147,9 +147,9 @@ export default class tg extends EventEmitter {
|
||||||
}
|
}
|
||||||
format(msg) {
|
format(msg) {
|
||||||
return msg.toString()
|
return msg.toString()
|
||||||
|
.split("&").join("&")
|
||||||
.split("<").join("<")
|
.split("<").join("<")
|
||||||
.split(">").join(">")
|
.split(">").join(">")
|
||||||
.split("&").join("&")
|
|
||||||
.replace(/\[b\](.*?)\[\/b\]/g, "<b>$1</b>") // bold
|
.replace(/\[b\](.*?)\[\/b\]/g, "<b>$1</b>") // bold
|
||||||
.replace(/\[i\](.*?)\[\/i\]/g, "<i>$1</i>") // italic
|
.replace(/\[i\](.*?)\[\/i\]/g, "<i>$1</i>") // italic
|
||||||
.replace(/\[color=(.*?)](.*?)\[\/color\]/g, "$2")
|
.replace(/\[color=(.*?)](.*?)\[\/color\]/g, "$2")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user