1
0
Fork 0
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:
Aleksa Sarai 2025-09-23 17:27:24 +10:00
parent 7e2695a1be
commit bd7b72e037
No known key found for this signature in database
GPG key ID: 2897FAD2B7E9446F
5 changed files with 27 additions and 19 deletions

View file

@ -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)