diff --git a/src/components/Markdown.tsx b/src/components/Markdown.tsx index 97a446884..85868308a 100644 --- a/src/components/Markdown.tsx +++ b/src/components/Markdown.tsx @@ -12,9 +12,11 @@ import { Motion } from "solid-motionone" import { unified } from "unified" import { useCDN, useParseText, useRouter } from "~/hooks" import { useScrollListener } from "~/pages/home/toolbar/BackTop.jsx" -import { getMainColor, getSettingBool, me } from "~/store" +import { getMainColor, getSettingBool, me, password } from "~/store" import { api, + base_path, + fsGet, loadCSS, loadScriptIIFE, notify, @@ -32,6 +34,53 @@ type TocItem = { indent: number; text: string; tagName: string; key: string } const MERMAID_PATTERN = /```mermaid[\s\S]*?```/i const MATH_PATTERN = /\$\$[\s\S]+?\$\$|\$[^$\n]+?\$/ +// markdown image syntax pointing to a video file is rendered as