Skip to content

Commit 97e84bd

Browse files
committed
Fix escape character handling in stringify method of Label class
1 parent 83d654f commit 97e84bd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

syntax/model.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export class Label {
3939
if (this.value === "<" || this.value === ">") {
4040
return this.value
4141
}
42-
return this.value.replace(/([<>[\](){}])/g, "\\$1")
42+
return this.value
43+
.replace(/([<>[\](){}\\])/g, "\\$1")
44+
.replace(/:{2,}/g, m => ":" + "\\:".repeat(m.length - 1))
4345
}
4446
}
4547

0 commit comments

Comments
 (0)