1 Commits
v1.5.0 ... main

Author SHA1 Message Date
douboer
dda7eaeec1 update at 2025-12-14 11:46:00 2025-12-14 11:46:00 +08:00

View File

@@ -257,7 +257,7 @@ export class ArticleRender implements MDRendererCallback {
}
// 自定义 fig 与 || 语法转换
private applyCustomInlineBlocks(md: string): string {
const figPattern = /\[fig([^\n\]]*?)\/\]/g; // [fig text/]
const figPattern = /\[fig\s+([^\]]*?)\]/g; // [fig text]
md = md.replace(figPattern, (_m, inner) => {
const content = inner.trim();
return `<span style="font-style: italic; font-size: 14px; background-color: #f5f5f5; padding: 2px;">${content}</span>`;