-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Use marked highlight
option instead of overriding code
#114
Comments
Hey, thanks for bringing this up... I was not aware of the This should also allow to simplify the code base, but yeah I'm also planning to change the whole implementation around |
Heh that's fair. It does look like Glad I could help! |
md-to-pdf/src/lib/get-marked-with-highlighter.ts
Lines 8 to 15 in e70ea15
Hi! I was wondering why code highlighting was implemented as an override to the
code
function of the marked renderer, versus utilizing thehighlighted
option in marked?I believe setting the options such that
would have the same result.
My current goal is to override the
code
renderer, and I do so by creating a new class that extendsmarked.Renderer
and defining a newcode
method within there. The current implementation of the marked integration, however, ends up overriding my custom class. The alternative methoddoes not allow me to easily fall back to the default handler.
If this change is OK I can submit a PR.
The text was updated successfully, but these errors were encountered: