From 68edec1c9a6b005b8e144bed335cfcf7aaf3a758 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 15 Jun 2023 18:14:06 -0500 Subject: [PATCH] Add another keyword to the list of WIT keywords when printing (#1074) This fixes a recent fuzz-bug which didn't escape `with` as `%with` --- crates/wit-component/src/printing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wit-component/src/printing.rs b/crates/wit-component/src/printing.rs index 566aad004a..2ffd658080 100644 --- a/crates/wit-component/src/printing.rs +++ b/crates/wit-component/src/printing.rs @@ -760,7 +760,7 @@ fn is_keyword(name: &str) -> bool { | "float32" | "float64" | "char" | "resource" | "record" | "flags" | "variant" | "enum" | "union" | "bool" | "string" | "option" | "result" | "future" | "stream" | "list" | "shared" | "_" | "as" | "from" | "static" | "interface" | "tuple" | "implements" - | "world" | "import" | "export" | "default" | "pkg" | "self" | "package" => true, + | "world" | "import" | "export" | "default" | "pkg" | "self" | "package" | "with" => true, _ => false, } }