mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
* Fixed Issue #6929 Escape unicode when inspecting Str added AUTHORS improved comment * update generated mono tests * fixed formatting * fixed merge conflicts
This commit is contained in:
parent
89ef225f5b
commit
716374cfc0
19 changed files with 3380 additions and 1070 deletions
|
@ -258,7 +258,14 @@ dbgStr = \s ->
|
|||
custom \f0 ->
|
||||
f0
|
||||
|> dbgWrite "\""
|
||||
|> dbgWrite s # TODO: Should we be escaping strings for dbg/logging?
|
||||
|> \f1 ->
|
||||
# escape invisible unicode characters as in fmt_str_body crates/compiler/fmt/src/expr.rs
|
||||
escapeS =
|
||||
Str.replaceEach s "\u(feff)" "\\u(feff)"
|
||||
|> Str.replaceEach "\u(200b)" "\\u(200b)"
|
||||
|> Str.replaceEach "\u(200c)" "\\u(200c)"
|
||||
|> Str.replaceEach "\u(200d)" "\\u(200d)"
|
||||
dbgWrite f1 escapeS
|
||||
|> dbgWrite "\""
|
||||
|
||||
dbgOpaque : * -> Inspector DbgFormatter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue