How can I get the escaped string?
LeeHongHwa opened this issue · 0 comments
LeeHongHwa commented
let source = "\\~hello\\~"
let document = Document(parsing: source, options: [])
// "\~hello\~"
print(source)
// "Text "~hello~"
print(document.debugDescription())
// not "\~hello\~" but "~hello~"
print(document.format())
The expected result is a string with backslash escaping, but it's not. How can I get the escaped string?