-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add marked:renderer filter #129
Conversation
Co-Authored-By: Sukka <isukkaw@gmail.com>
Co-Authored-By: Sukka <isukkaw@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@curbengh What do you think?
@@ -132,7 +132,11 @@ module.exports = function(data, options) { | |||
} | |||
}); | |||
|
|||
// exec filter to extend renderer. | |||
const renderer = new Renderer(); | |||
this.execFilterSync('marked:renderer', renderer, {context: this}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume execFilter()
is not used because marked is not async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@curbengh marked
support async, but in hexo-renderer-marked
, no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible for this plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume
execFilter()
is not used because marked is not async?
I tried execFilter()
, but fail. This is beyond my ability 😂 . @curbengh good job.
This is a good feature. 👍 Seems helpful to hexojs/hexo#3889, @aaaa0long: this means you no longer need to fork this plugin. |
I managed to replace cheerio with this feature 👍 |
New feature |
As in the test case, exposing the renderer object, and give the outside the ability to modify it.