瀏覽代碼

dont use parseFrontmatter

reiji-h 2 年之前
父節點
當前提交
b3e66b33cc
共有 1 個文件被更改,包括 2 次插入6 次删除
  1. 2 6
      packages/presentation/src/components/Presentation.tsx

+ 2 - 6
packages/presentation/src/components/Presentation.tsx

@@ -3,7 +3,6 @@ import React, { useEffect } from 'react';
 import Reveal from 'reveal.js';
 import Reveal from 'reveal.js';
 
 
 import type { PresentationOptions } from '../consts';
 import type { PresentationOptions } from '../consts';
-import { parseSlideFrontmatterInMarkdown } from '../services/parse-slide-frontmatter';
 
 
 import { Slides } from './Slides';
 import { Slides } from './Slides';
 
 
@@ -34,17 +33,14 @@ const removeAllHiddenElements = () => {
 
 
 export type PresentationProps = {
 export type PresentationProps = {
   options: PresentationOptions,
   options: PresentationOptions,
-  isEnabledMarp: boolean,
+  hasMarpFlag: boolean,
   children?: string,
   children?: string,
 }
 }
 
 
 export const Presentation = (props: PresentationProps): JSX.Element => {
 export const Presentation = (props: PresentationProps): JSX.Element => {
-  const { options, isEnabledMarp, children } = props;
+  const { options, hasMarpFlag, children } = props;
   const { revealOptions } = options;
   const { revealOptions } = options;
 
 
-  const [marp] = parseSlideFrontmatterInMarkdown(children);
-  const hasMarpFlag = isEnabledMarp && marp;
-
   useEffect(() => {
   useEffect(() => {
     if (children == null) {
     if (children == null) {
       return;
       return;