Escape backspace and form feed with better sequence
This commit is contained in:
parent
647ef2d2e9
commit
02a260ae75
1 changed files with 2 additions and 0 deletions
|
@ -348,6 +348,8 @@ pasteUtf8TextJson# src# soff0# slen0# dst# doff0# s0# =
|
||||||
'\n' -> write2 dst doff '\\' 'n' *> go (soff + 1) (slen - 1) (doff + 2)
|
'\n' -> write2 dst doff '\\' 'n' *> go (soff + 1) (slen - 1) (doff + 2)
|
||||||
'\r' -> write2 dst doff '\\' 'r' *> go (soff + 1) (slen - 1) (doff + 2)
|
'\r' -> write2 dst doff '\\' 'r' *> go (soff + 1) (slen - 1) (doff + 2)
|
||||||
'\t' -> write2 dst doff '\\' 't' *> go (soff + 1) (slen - 1) (doff + 2)
|
'\t' -> write2 dst doff '\\' 't' *> go (soff + 1) (slen - 1) (doff + 2)
|
||||||
|
'\b' -> write2 dst doff '\\' 'b' *> go (soff + 1) (slen - 1) (doff + 2)
|
||||||
|
'\f' -> write2 dst doff '\\' 'f' *> go (soff + 1) (slen - 1) (doff + 2)
|
||||||
_ -> do
|
_ -> do
|
||||||
write2 dst doff '\\' 'u'
|
write2 dst doff '\\' 'u'
|
||||||
doff' <- UnsafeBounded.pasteST
|
doff' <- UnsafeBounded.pasteST
|
||||||
|
|
Loading…
Reference in a new issue