File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 18
18
sepRegex = regexp .MustCompile (`^\s*---+\s*$` )
19
19
endHeaderRegex = regexp .MustCompile (`^\s*===+\s*$` )
20
20
strictSepRegex = regexp .MustCompile (`^---\n$` )
21
- skipRegex = regexp .MustCompile (`^![-.:*\w]+\s*$` )
21
+ skipRegex = regexp .MustCompile (`^![ -.:*\w]+\s*$` )
22
22
nameRegex = regexp .MustCompile (`^[a-z]+$` )
23
23
)
24
24
Original file line number Diff line number Diff line change @@ -242,6 +242,23 @@ share output filters: shared
242
242
}}).Equal (t , out )
243
243
}
244
244
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
+
245
262
func TestParseMetaData (t * testing.T ) {
246
263
input := `
247
264
name: first
You can’t perform that action at this time.
0 commit comments