Procházet zdrojové kódy

avoid to create empty slide

reiji-h před 2 roky
rodič
revize
2d3b2c10d7

+ 1 - 1
packages/presentation/src/services/renderer/extract-sections.ts

@@ -62,7 +62,7 @@ export const remarkPlugin: Plugin<[ExtractSectionsPluginParams]> = (options) =>
       tree,
       tree,
       startCondition,
       startCondition,
       (node, index, parent: Parent) => {
       (node, index, parent: Parent) => {
-        if (parent == null || parent.type !== 'root') {
+        if (parent == null || parent.type !== 'root' || node.type === 'yaml') {
           return;
           return;
         }
         }