Skip to content

Commit c7de5f8

Browse files
author
Dobromir Hristov
committed
chore: move Video to block type
1 parent ccd67d2 commit c7de5f8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/components/ContentNode.vue

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ const BlockType = {
3333
termList: 'termList',
3434
unorderedList: 'unorderedList',
3535
dictionaryExample: 'dictionaryExample',
36+
video: 'video',
3637
};
3738
3839
const InlineType = {
3940
codeVoice: 'codeVoice',
4041
emphasis: 'emphasis',
4142
image: 'image',
42-
video: 'video',
4343
inlineHead: 'inlineHead',
4444
link: 'link',
4545
newTerm: 'newTerm',
@@ -277,6 +277,19 @@ function renderNode(createElement, references) {
277277
};
278278
return createElement(DictionaryExample, { props }, renderChildren(node.summary || []));
279279
}
280+
case BlockType.video: {
281+
if (node.metadata && node.metadata.abstract) {
282+
return renderFigure(node);
283+
}
284+
285+
return references[node.identifier] ? (
286+
createElement(InlineVideo, {
287+
props: {
288+
identifier: node.identifier,
289+
},
290+
})
291+
) : null;
292+
}
280293
case InlineType.codeVoice:
281294
return createElement(CodeVoice, {}, (
282295
node.code
@@ -303,19 +316,6 @@ function renderNode(createElement, references) {
303316
null
304317
);
305318
}
306-
case InlineType.video: {
307-
if (node.metadata && node.metadata.abstract) {
308-
return renderFigure(node);
309-
}
310-
311-
return references[node.identifier] ? (
312-
createElement(InlineVideo, {
313-
props: {
314-
identifier: node.identifier,
315-
},
316-
})
317-
) : null;
318-
}
319319
case InlineType.link:
320320
// Note: `InlineType.link` has been deprecated, but may still be found in old JSON.
321321
return createElement('a', { attrs: { href: node.destination } }, (

0 commit comments

Comments
 (0)