Add socket repl eval code escaping
Fixes different escaping behavior for socket repl connection and others.
Steps to reproduce the issue:
1. Create a `ClojureSublimedEvalCode` hotkey with `"` in the code:
```
{"keys": ["ctrl+h"],
"command": "clojure_sublimed_eval_code",
"args": {"code": "\"Hello!\""}}
```
2. Connect to a raw nREPL and press `ctrl+h`. You'll see `✅ "Hello!"` in the status line
3. Connect to a socket REPL and press `ctrl+h`. You'll see `⏳ "Hello!"` in the status line
Another way to reproduce the issue:
1. Create a `ClojureSublimedEvalCode` hotkey with `"` in the code:
```
{"keys": ["ctrl+h"],
"command": "clojure_sublimed_eval_code",
"args": {"code": "(str \"Hello!\")"}}
```
2. Connect to a raw nREPL and press `ctrl+h`. You'll see `✅ "Hello!"` in the status line
3. Connect to a socket REPL and press `ctrl+h`. You'll see `❌ RuntimeException: EOF while reading` in the status line
This PR fixes the issue in both cases
合并状态:已合并 合并于 2024-03-04 关闭于 2024-03-04 0 条评论