Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

- Fix: Absence of Node.js does not hinder LSP server. https://github.com/rescript-lang/rescript-vscode/pull/1083

- Fix: JSON from `rescript-code-editor-analysis` was not always escaped properly, which prevented code actions from being available in certain situations https://github.com/rescript-lang/rescript-vscode/pull/1089

## 1.62.0

#### :nail_care: Polish
Expand Down
5 changes: 4 additions & 1 deletion analysis/vendor/json/Json.ml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ let escape text =
| '\b' -> Buffer.add_string buf "\\b"
| '\r' -> Buffer.add_string buf "\\r"
| '\t' -> Buffer.add_string buf "\\t"
| c -> Buffer.add_char buf c);
| c ->
let code = Char.code c in
if code < 0x20 then Printf.bprintf buf "\\u%04x" code
else Buffer.add_char buf c);
loop (i + 1))
in
loop 0;
Expand Down