Skip to content

Commit

Permalink
Fix escaping of backticks in symbol <escaped-identifier>
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Dec 28, 2024
1 parent 1e23f79 commit dced090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindings/rust/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn escape_name(name: &str) -> String {
{
name.to_string()
} else {
format!("`{}`", name)
format!("`{}`", name.replace("`", "``"))
}
}

Expand Down Expand Up @@ -624,7 +624,7 @@ mod test {
};
let symbol = format_symbol(symbol_struct.clone());

assert_eq!(symbol, "scip-ctags . . . `foo=`.");
assert_eq!(symbol, "scip-ctags . . . `foo=``bar```.");
assert_eq!(parse_symbol(&symbol).expect("to parse"), symbol_struct);
}

Expand Down

0 comments on commit dced090

Please sign in to comment.