fix(compiler): 移除 YAML frontmatter 避免解析错误

This commit is contained in:
Uglyboy 2026-04-08 09:20:06 +08:00
parent 117563567a
commit b75e90b26d

View file

@ -22,7 +22,8 @@ export const compiledStory = (): InkStory | null => {
}
try {
const ink: InkStory = createInkStory(markdown, {
const content = markdown.replace(/^---\n[\s\S]*?\n---\n?/, "");
const ink: InkStory = createInkStory(content, {
title: filePath,
fileHandler,
errorHandler,