Skip to content

Commit

Permalink
Don't HTML escape bazel mod JSON output
Browse files Browse the repository at this point in the history
Otherwise `"<root>"` ends up being escaped with Unicode escape sequences, which is unnecessarily complex.
  • Loading branch information
fmeum committed Sep 27, 2024
1 parent 56882d5 commit 743cec0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public void output() {
seenExtensions = new HashSet<>();
JsonObject root = printModule(ModuleKey.ROOT, null, IsExpanded.TRUE, IsIndirect.FALSE);
root.addProperty("root", true);
printer.println(new GsonBuilder().setPrettyPrinting().create().toJson(root));
printer.println(
new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create().toJson(root));
}

public String printKey(ModuleKey key) {
Expand Down

0 comments on commit 743cec0

Please sign in to comment.