Fix handling of < in values, broken by map merging Fixes issue #24.
diff --git a/decode_test.go b/decode_test.go index d2b45b3..a290645 100644 --- a/decode_test.go +++ b/decode_test.go
@@ -371,6 +371,12 @@ "a: 3s", map[string]time.Duration{"a": 3 * time.Second}, }, + + // Issue #24. + { + "a: <foo>", + map[string]string{"a": "<foo>"}, + }, } type inlineB struct {
diff --git a/encode_test.go b/encode_test.go index c7461d5..83dc490 100644 --- a/encode_test.go +++ b/encode_test.go
@@ -219,6 +219,12 @@ map[string]time.Duration{"a": 3 * time.Second}, "a: 3s\n", }, + + // Issue #24. + { + map[string]string{"a": "<foo>"}, + "a: <foo>\n", + }, } func (s *S) TestMarshal(c *C) {
diff --git a/resolve.go b/resolve.go index fdc4909..863c314 100644 --- a/resolve.go +++ b/resolve.go
@@ -27,7 +27,6 @@ t[int(c)] = 'M' // In map } t[int('.')] = '.' // Float (potentially in map) - t[int('<')] = '<' // Merge var resolveMapList = []struct { v interface{}