File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ pub mod stage_1;
77
88/// Parses the given input string to produce an AST for the metadata
99pub fn parse_metadata ( input : & str ) -> Result < NorgMeta , NorgParseError > {
10- let processed = format ! ( "{{\n {}\n }}\n " , input. trim( ) ) ;
10+ // don't ask me why this fixes it. I don't even care
11+ let processed = input. replace ( "\n ]" , "\n ]" ) ;
12+ let processed = format ! ( "{{\n {}\n }}\n " , processed. trim( ) ) ;
1113 Ok ( stage_1:: meta_parser ( ) . parse ( processed) ?)
1214}
1315
@@ -91,7 +93,7 @@ mod tests {
9193 hi
9294 ]
9395 ]" ,
94- "arr:[]\n a2:[\n ]x : y" ,
96+ "arr:[]\n a2:[\n ]\n a3:[ \n hi \n ] \n x : y" ,
9597 ]
9698 . into_iter ( )
9799 . map ( |example| example. to_string ( ) + "\n " )
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ expression: examples
3434- Object :
3535 a2 :
3636 Array : []
37+ a3 :
38+ Array :
39+ - Str : hi
3740 arr :
3841 Array : []
3942 x :
You can’t perform that action at this time.
0 commit comments