|
|
@ -83,6 +83,20 @@ module.exports = class { |
|
|
|
|
|
|
|
this.state.text = input.post.text.replace(/\x02/g, "**").replace(/\x1D/g, "*").replace(/\`/g, "\\`").trim(); |
|
|
|
|
|
|
|
// Fix Ctrl-Bs
|
|
|
|
let left = false |
|
|
|
this.state.text = this.state.text.replace(/\s*\*\*\s*/g, str => { |
|
|
|
left = !left |
|
|
|
|
|
|
|
if (left) { |
|
|
|
return " **" |
|
|
|
} else if (!left) { |
|
|
|
return "** " |
|
|
|
} |
|
|
|
|
|
|
|
return str |
|
|
|
}) |
|
|
|
|
|
|
|
if (this.state.text.startsWith("|")) { |
|
|
|
this.state.name = "" |
|
|
|
this.state.text = this.state.text.slice(1).trim(); |
|
|
|