@@ -127,15 +127,15 @@ let figure ~lang ~loc ~name children =
127
127
| [] -> star ~lang ~loc ~name children
128
128
| first ::others ->
129
129
if is_element_with_name (html " figcaption" ) first then
130
- (" figcaption" ,
130
+ (Pc.Label. labelled " figcaption" ,
131
131
[% expr `Top [% e Pc. wrap_value lang loc first]])::
132
132
(star ~lang ~loc ~name others)
133
133
else
134
134
let children_reversed = List. rev children in
135
135
let last = List. hd children_reversed in
136
136
if is_element_with_name (html " figcaption" ) last then
137
137
let others = List. rev (List. tl children_reversed) in
138
- (" figcaption" ,
138
+ (Pc.Label. labelled " figcaption" ,
139
139
[% expr `Bottom [% e Pc. wrap_value lang loc last]])::
140
140
(star ~lang ~loc ~name others)
141
141
else
@@ -146,15 +146,17 @@ let object_ ~lang ~loc ~name children =
146
146
let params, others = partition (html " param" ) children in
147
147
148
148
if params <> [] then
149
- (" params" , Pc. list_wrap_value lang loc params) :: star ~lang ~loc ~name others
149
+ (Pc.Label. labelled " params" , Pc. list_wrap_value lang loc params) ::
150
+ star ~lang ~loc ~name others
150
151
else
151
152
star ~lang ~loc ~name others
152
153
153
154
let audio_video ~lang ~loc ~name children =
154
155
let sources, others = partition (html " source" ) children in
155
156
156
157
if sources <> [] then
157
- (" srcs" , Pc. list_wrap_value lang loc sources) :: star ~lang ~loc ~name others
158
+ (Pc.Label. labelled " srcs" , Pc. list_wrap_value lang loc sources) ::
159
+ star ~lang ~loc ~name others
158
160
else
159
161
star ~lang ~loc ~name others
160
162
@@ -166,13 +168,13 @@ let table ~lang ~loc ~name children =
166
168
167
169
let one label = function
168
170
| [] -> []
169
- | [child] -> [label, Pc. wrap_value lang loc child]
171
+ | [child] -> [Pc.Label. labelled label, Pc. wrap_value lang loc child]
170
172
| _ -> Pc. error loc " %s cannot have more than one %s" name label
171
173
in
172
174
173
175
let columns =
174
176
if columns = [] then []
175
- else [" columns" , Pc. list_wrap_value lang loc columns]
177
+ else [Pc.Label. labelled " columns" , Pc. list_wrap_value lang loc columns]
176
178
in
177
179
178
180
(one " caption" caption) @
@@ -187,7 +189,7 @@ let fieldset ~lang ~loc ~name children =
187
189
match legend with
188
190
| [] -> star ~lang ~loc ~name others
189
191
| [legend] ->
190
- (" legend" , Pc. wrap_value lang loc legend)::
192
+ (Pc.Label. labelled " legend" , Pc. wrap_value lang loc legend)::
191
193
(star ~lang ~loc ~name others)
192
194
| _ -> Pc. error loc " %s cannot have more than one legend" name
193
195
@@ -197,11 +199,11 @@ let datalist ~lang ~loc ~name children =
197
199
let children =
198
200
begin match others with
199
201
| [] ->
200
- " children" ,
202
+ Pc.Label. labelled " children" ,
201
203
[% expr `Options [% e Pc. list_wrap_value lang loc options]]
202
204
203
205
| _ ->
204
- " children" ,
206
+ Pc.Label. labelled " children" ,
205
207
[% expr `Phras [% e Pc. list_wrap_value lang loc children]]
206
208
end [@ metaloc loc]
207
209
in
@@ -219,7 +221,7 @@ let details ~lang ~loc ~name children =
219
221
220
222
let menu ~lang ~loc ~name children =
221
223
let children =
222
- " child" ,
224
+ Pc.Label. labelled " child" ,
223
225
[% expr `Flows [% e Pc. list_wrap_value lang loc children]]
224
226
[@ metaloc loc]
225
227
in
0 commit comments