mirror of
https://github.com/github/codeql.git
synced 2026-02-19 16:33:40 +01:00
Escape label keys
This commit is contained in:
@@ -533,7 +533,9 @@ impl fmt::Display for TrapEntry {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
TrapEntry::FreshId(label) => write!(f, "{} = *", label),
|
||||
TrapEntry::MapLabelToKey(label, key) => write!(f, "{} = @\"{}\"", label, key),
|
||||
TrapEntry::MapLabelToKey(label, key) => {
|
||||
write!(f, "{} = @\"{}\"", label, key.replace("\"", "\"\""))
|
||||
}
|
||||
TrapEntry::GenericTuple(name, args) => {
|
||||
write!(f, "{}(", name)?;
|
||||
for (index, arg) in args.iter().enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user