-
Notifications
You must be signed in to change notification settings - Fork 35
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
Expose callback function to element #33
Expose callback function to element #33
Conversation
Friendly ping. Still relying on my own fork for this feature. |
/cc @FredKSchott |
Friendly ping, this very small change allows us to mimic the GitHub markdown flavors. |
Oh man, thought I had looked at this already 😞 |
type: Function, | ||
value: function() { | ||
return function(err, text) { | ||
return text; |
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.
Do we want errors to be swallowed by default? I assume this changes marked's behavior to propagate errors asynchronously instead of throwing them synchronously. Can this be null/undefined instead?
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.
Yes I have turned it into null per https://github.com/chjj/marked/blob/master/lib/marked.js#L1148. Sorry for the long wait, I was on vacation 😂
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.
no problem, for this PR I'd be a hypocrite to complain :)
👍 New feature looks great! Just 1 question around default behavior. |
4455afb
to
5d18bf2
Compare
LGTM, Thanks @TimvdLippe! Merging now |
This allows users to set custom callbacks to modify the outputted HTML. We use this in our project to modify GitHub issue references as follows: