Skip to content

Commit 2d2864b

Browse files
committed
[rdar://30234820] fix: address feedback
1 parent 50db242 commit 2d2864b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/ContentNode.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ function renderNode(createElement, references) {
213213
}
214214
};
215215
216-
const placeCaption = (rawContent, { abstract = [], title, ...others }) => {
216+
const placeCaption = (rawContent, { abstract = [], title, tag }) => {
217217
const content = [rawContent];
218218
if (!abstract.length) return content;
219219
220220
// if there is a `title`, it should be above, otherwise below
221221
content.splice(title ? 0 : 1, 0,
222222
createElement(Caption, {
223-
props: { title, centered: !title, ...others },
223+
props: { title, centered: !title, tag },
224224
}, renderChildren(abstract)));
225225
return content;
226226
};
@@ -308,16 +308,15 @@ function renderNode(createElement, references) {
308308
));
309309
}
310310
case BlockType.table: {
311-
let tableContent = [renderTableChildren(
311+
let tableContent = renderTableChildren(
312312
node.rows, node.header, node.extendedData, node.alignments,
313-
)];
313+
);
314314
315315
if (node.metadata && node.metadata.anchor) {
316-
tableContent = placeCaption(renderTableChildren(
317-
node.rows, node.header, node.extendedData, node.alignments,
318-
), {
316+
tableContent = placeCaption(tableContent, {
319317
title: node.metadata.title,
320318
abstract: node.metadata.abstract,
319+
tag: 'caption',
321320
});
322321
}
323322

0 commit comments

Comments
 (0)