Repository: goccy/go-yaml (go)

Issue:
Allow new-line and indented map as value of slice
I want to decode new-line and indented map as value of slice.

like follows

```yaml
a:
-
  b: d
  c: e
-
  b: f
  c: g
```

| | go-yaml/yaml | goccy/go-yaml v1.4.1 |
| --- | --- | --- | 
| decode | can decode | error |
| play.golang.org | [here](https://play.golang.org/p/Niu8FXan10A) | [here](https://play.golang.org/p/6G8ZrkdsoXb) | 

I have tried this problem but have not solved it yet ... so I first register this issue.


Pull request description:
Fix handling of sequence indicator
resolve #94


Patch:
diff --git a/scanner/scanner.go b/scanner/scanner.go
index 0b287bb..4bff241 100644
--- a/scanner/scanner.go
+++ b/scanner/scanner.go
@@ -431,7 +431,7 @@ func (s *Scanner) scan(ctx *Context) (pos int) {
 				continue
 			}
 			nc := ctx.nextChar()
-			if nc == ' ' {
+			if nc == ' ' || s.isNewLineChar(nc) {
 				s.addBufferedTokenIfExists(ctx)
 				ctx.addOriginBuf(c)
 				tk := token.SequenceEntry(string(ctx.obuf), s.pos())


Test patch:
diff --git a/parser/parser_test.go b/parser/parser_test.go
index f4747c3..e08e208 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -497,6 +497,24 @@ a - b - c: value
 `,
 			`
 a - b - c: value
+`,
+		},
+		{
+			`
+a:
+-
+  b: c
+  d: e
+-
+  f: g
+  h: i
+`,
+			`
+a:
+- b: c
+  d: e
+- f: g
+  h: i
 `,
 		},
 	}