swiftlang/swift-markdown

How can I get the escaped string?

LeeHongHwa opened this issue · 0 comments

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?