Skip to content

Commit fa61947

Browse files
author
Henrik Tjäder
committed
Fix typo when escaping brackets
1 parent 1d5db1d commit fa61947

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ pub fn escape_brackets(s: &str) -> String {
156156
x.to_string()
157157
} else {
158158
if acc.ends_with("\\") {
159-
acc.to_owned() + "[" + &x.to_string()
159+
acc.to_owned() + "]" + &x.to_string()
160160
} else {
161-
acc.to_owned() + "\\[" + &x.to_string()
161+
acc.to_owned() + "\\]" + &x.to_string()
162162
}
163163
}
164164
})

0 commit comments

Comments
 (0)