@@ -213,14 +213,14 @@ function renderNode(createElement, references) {
213
213
}
214
214
};
215
215
216
- const placeCaption = (rawContent , { abstract = [], title, ... others }) => {
216
+ const placeCaption = (rawContent , { abstract = [], title, tag }) => {
217
217
const content = [rawContent];
218
218
if (! abstract .length ) return content;
219
219
220
220
// if there is a `title`, it should be above, otherwise below
221
221
content .splice (title ? 0 : 1 , 0 ,
222
222
createElement (Caption, {
223
- props: { title, centered: ! title, ... others },
223
+ props: { title, centered: ! title, tag },
224
224
}, renderChildren (abstract)));
225
225
return content;
226
226
};
@@ -308,16 +308,15 @@ function renderNode(createElement, references) {
308
308
));
309
309
}
310
310
case BlockType .table : {
311
- let tableContent = [ renderTableChildren (
311
+ let tableContent = renderTableChildren (
312
312
node .rows , node .header , node .extendedData , node .alignments ,
313
- )] ;
313
+ );
314
314
315
315
if (node .metadata && node .metadata .anchor ) {
316
- tableContent = placeCaption (renderTableChildren (
317
- node .rows , node .header , node .extendedData , node .alignments ,
318
- ), {
316
+ tableContent = placeCaption (tableContent, {
319
317
title: node .metadata .title ,
320
318
abstract: node .metadata .abstract ,
319
+ tag: ' caption' ,
321
320
});
322
321
}
323
322
0 commit comments