We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7576a9 commit 474d4d5Copy full SHA for 474d4d5
src/util.rs
@@ -165,19 +165,19 @@ pub fn escape_brackets(s: &str) -> String {
165
if acc == "" {
166
x.to_string()
167
} else if acc.ends_with('\\') {
168
- acc + "[" + &x.to_string()
+ acc + "[" + x
169
} else {
170
- acc + "\\[" + &x.to_string()
+ acc + "\\[" + x
171
}
172
})
173
.split(']')
174
.fold("".to_string(), |acc, x| {
175
176
177
178
- acc + "]" + &x.to_string()
+ acc + "]" + x
179
180
- acc + "\\]" + &x.to_string()
+ acc + "\\]" + x
181
182
183
0 commit comments