mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-10-04 12:31:00 +00:00
govis: support double quote escapes
This is supported by both OpenBSD and FreBSD so it seems possible that we will run into \" sequences at some point. The handling is basically identical to \\ sequences. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
parent
7e2695a1be
commit
bd7b72e037
5 changed files with 27 additions and 19 deletions
|
@ -225,9 +225,9 @@ func (p *unvisParser) escapeSequence() error {
|
|||
}
|
||||
|
||||
switch ch {
|
||||
case '\\':
|
||||
case '\\', '"':
|
||||
p.Step()
|
||||
return p.output.WriteByte('\\')
|
||||
return p.output.WriteByte(byte(ch))
|
||||
|
||||
case '0', '1', '2', '3', '4', '5', '6', '7':
|
||||
return p.escapeDigits(8, false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue