moonbitlang / moonbit-docs

The docs of MoonBit programming language
https://docs.moonbitlang.com
Other
1.18k stars 53 forks source link

Editor outputs incorrect string representation of `Bytes` #312

Open tonyfettes opened 1 month ago

tonyfettes commented 1 month ago

Pick any of the editor on the documentation website here and modify the result as

fn main {
  let b1 : Bytes = b"abcd"
  println(b1) // true
}

It will output:

ac

while we expect it to output:

b"\x61\x62\x63\x64"

Reported by @Demonmasterlqx

bobzhang commented 3 weeks ago

note this bug only appears in the code mirror based IDE, I could not reproduce in https://try.moonbitlang.cn/

peter-jerry-ye commented 3 weeks ago

This is likely due to the out-of-dated moonbit-pad @bzy-debug