File tree Expand file tree Collapse file tree 3 files changed +30
-31
lines changed Expand file tree Collapse file tree 3 files changed +30
-31
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,6 @@ sub reformat_input_text {
173
173
# Add missing parens in rule 211:
174
174
s / (l-document-suffix\+ l-document-prefix\*\n l-any-document\? )(\n\| )(l-document-prefix\* l-explicit-document\? )/ ( $1 )$2 ( $3 )/ ;
175
175
176
-
177
176
return $_ ;
178
177
}
179
178
@@ -553,6 +552,7 @@ my $n = 1;
553
552
sub reformat_data {
554
553
my ($data ) = @_ ;
555
554
555
+
556
556
for my $next (@$data ) {
557
557
if (my $rule = $next -> {rule }) {
558
558
$rule -> {rule } = reformat_node($rule -> {rule });
@@ -646,6 +646,7 @@ sub reformat_data {
646
646
return { $func => reformat_node($array ) };
647
647
}
648
648
else {
649
+ $array = $array -> [0] if @$array == 1;
649
650
return { $func => reformat_node(reformatted($array )) };
650
651
}
651
652
}
Original file line number Diff line number Diff line change 3067
3067
"(???)" : " l-any-document"
3068
3068
},
3069
3069
{
3070
- "(***)" : [
3071
- {
3072
- "(any)" : [
3073
- {
3074
- "(all)" : [
3075
- {
3076
- "(+++)" : " l-document-suffix"
3077
- },
3078
- {
3079
- "(***)" : " l-document-prefix"
3080
- },
3081
- {
3082
- "(???)" : " l-any-document"
3083
- }
3084
- ]
3085
- },
3086
- {
3087
- "(all)" : [
3088
- {
3089
- "(***)" : " l-document-prefix"
3090
- },
3091
- {
3092
- "(???)" : " l-explicit-document"
3093
- }
3094
- ]
3095
- }
3096
- ]
3097
- }
3098
- ]
3070
+ "(***)" : {
3071
+ "(any)" : [
3072
+ {
3073
+ "(all)" : [
3074
+ {
3075
+ "(+++)" : " l-document-suffix"
3076
+ },
3077
+ {
3078
+ "(***)" : " l-document-prefix"
3079
+ },
3080
+ {
3081
+ "(???)" : " l-any-document"
3082
+ }
3083
+ ]
3084
+ },
3085
+ {
3086
+ "(all)" : [
3087
+ {
3088
+ "(***)" : " l-document-prefix"
3089
+ },
3090
+ {
3091
+ "(???)" : " l-explicit-document"
3092
+ }
3093
+ ]
3094
+ }
3095
+ ]
3096
+ }
3099
3097
}
3100
3098
]
3101
3099
}
Original file line number Diff line number Diff line change @@ -3332,7 +3332,7 @@ l-yaml-stream:
3332
3332
- (***) : l-document-prefix
3333
3333
- (???) : l-any-document
3334
3334
- (***) :
3335
- - (any) :
3335
+ (any) :
3336
3336
- (all) :
3337
3337
- (+++) : l-document-suffix
3338
3338
- (***) : l-document-prefix
You can’t perform that action at this time.
0 commit comments