From e92cb81296e34e85d54bf26f35b6eda83d78b534 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sat, 30 Dec 2023 19:29:37 +0800 Subject: [PATCH] [fix] gallery & image --- _config.yml | 1 - scripts/filters/index.js | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/_config.yml b/_config.yml index 7886424..6dd425f 100755 --- a/_config.yml +++ b/_config.yml @@ -240,7 +240,6 @@ tag_plugins: # {% image %} image: fancybox: false # true, false - parse_markdown: true # 把 markdown 格式的图片解析成图片标签 # {% timeline %} timeline: diff --git a/scripts/filters/index.js b/scripts/filters/index.js index 1c48850..5285154 100644 --- a/scripts/filters/index.js +++ b/scripts/filters/index.js @@ -2,16 +2,3 @@ hexo.extend.filter.register('after_render:html', require('./lib/img_lazyload').processSite); hexo.extend.filter.register('after_render:html', require('./lib/img_onerror').processSite); - -function change_image(data) { - if (this.theme.config.tag_plugins.image.parse_markdown) { - data.content = data.content.replace( - /!\[(.*?)\]\((.*?)\s*(?:"(.*?)")?\)/g, - '{% image $2 $3 %}' - ); - } - return data; -} - - -hexo.extend.filter.register('before_post_render', change_image, 9);