diff --git a/scripts/image.js b/scripts/image.js index 8e220a8..8d4147b 100644 --- a/scripts/image.js +++ b/scripts/image.js @@ -11,7 +11,7 @@ const { join } = require('path').posix hexo.extend.filter.register('marked:renderer', (renderer) => { - renderer.image = (href, title, alt) => { + renderer.image = ({ href, title, text: alt }) => { if (!alt) alt = '' if (!title) title = alt diff --git a/themes/chameleon/scripts/heading-link.js b/themes/chameleon/scripts/heading-link.js index 96f2470..6feab1f 100644 --- a/themes/chameleon/scripts/heading-link.js +++ b/themes/chameleon/scripts/heading-link.js @@ -15,7 +15,7 @@ const anchorId = (str, transformOption) => { hexo.extend.filter.register('marked:renderer', function (renderer) { const { config } = this const headingId = {} - renderer.heading = function (text, level) { + renderer.heading = function ({ text, depth: level }) { const { modifyAnchors } = config.marked const transformOption = modifyAnchors let id = anchorId(text, transformOption)