Added correction of Ctrl+Bs in log posts showing as ** due to markdown being particular about where the bolds should be.
the build was successful
the build was successful
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user