hexo-renderer-markdown-it icon indicating copy to clipboard operation
hexo-renderer-markdown-it copied to clipboard

postAsset config in markdown-it render

Open fengkx opened this issue 4 years ago • 3 comments

I want to implement postAsset in markdown-it render.

I try implement it with a filter bind to markdown-it:renderer. But later I can't find a way to access data.path like here in the filter.

Is there any way to access the post currently render in markdown-it:render filter?

Maybe add an args when execute the filter may help?

this.execFilterSync('markdown-it:renderer', parser, { context: this , args: [data.path]});

fengkx avatar Nov 19 '20 10:11 fengkx

See https://github.com/hexojs/hexo-renderer-marked/pull/173

SukkaW avatar Nov 19 '20 10:11 SukkaW

The problem is I cannot access data https://github.com/curbengh/hexo-renderer-marked/blob/d5c2ed1ec65fa400def711287e40d85befe405dc/lib/renderer.js#L227 in the filter @SukkaW

fengkx avatar Nov 19 '20 11:11 fengkx

Make a pull request about this #141

fengkx avatar Nov 19 '20 16:11 fengkx