File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1818 sepRegex = regexp .MustCompile (`^\s*---+\s*$` )
1919 endHeaderRegex = regexp .MustCompile (`^\s*===+\s*$` )
2020 strictSepRegex = regexp .MustCompile (`^---\n$` )
21- skipRegex = regexp .MustCompile (`^![-.:*\w]+\s*$` )
21+ skipRegex = regexp .MustCompile (`^![ -.:*\w]+\s*$` )
2222 nameRegex = regexp .MustCompile (`^[a-z]+$` )
2323)
2424
Original file line number Diff line number Diff line change @@ -242,6 +242,23 @@ share output filters: shared
242242 }}).Equal (t , out )
243243}
244244
245+ func TestParseMetaDataSpace (t * testing.T ) {
246+ input := `
247+ name: a space
248+ body
249+ ---
250+ !metadata:a space:other
251+ foo bar
252+ `
253+ tools , err := ParseTools (strings .NewReader (input ))
254+ require .NoError (t , err )
255+
256+ assert .Len (t , tools , 1 )
257+ autogold .Expect (map [string ]string {
258+ "other" : "foo bar" ,
259+ }).Equal (t , tools [0 ].MetaData )
260+ }
261+
245262func TestParseMetaData (t * testing.T ) {
246263 input := `
247264name: first
You can’t perform that action at this time.
0 commit comments