goprotobuf: Be more liberal in text format string parsing.
Also, a minor style tweak in CompactTextString.
R=r
CC=golang-dev
http://codereview.appspot.com/5876069
diff --git a/proto/text_parser_test.go b/proto/text_parser_test.go
index c178449..6212e9e 100644
--- a/proto/text_parser_test.go
+++ b/proto/text_parser_test.go
@@ -92,6 +92,15 @@
},
},
+ // Quoted string with escaped apostrophe
+ {
+ in: `count:42 name: "HOLIDAY - New Year\'s Day"`,
+ out: &MyMessage{
+ Count: Int32(42),
+ Name: String("HOLIDAY - New Year's Day"),
+ },
+ },
+
// Bad quoted string
{
in: `inner: < host: "\0" >` + "\n",