update at 2025-12-14 11:46:00
This commit is contained in:
@@ -223,7 +223,7 @@ export class ArticleRender implements MDRendererCallback {
|
||||
}
|
||||
|
||||
// 处理 gallery 短代码 -> wikilink 图片列表
|
||||
md = await transformGalleryShortcodes(md, this.settings.galleryPrePath, this.settings.galleryNumPic);
|
||||
md = await transformGalleryShortcodes(md, this.settings.galleryPrePath, this.settings.galleryNumPic);
|
||||
|
||||
// 自定义行级语法转换: [fig .../] 以及 || 前缀块
|
||||
md = this.applyCustomInlineBlocks(md);
|
||||
@@ -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>`;
|
||||
|
||||
Reference in New Issue
Block a user