Fallback NodeRenderer #345
emad-elsaid
started this conversation in
Ideas
Replies: 2 comments
-
I do not stand this idea. Renderer should stick to rendering nodes. Renderer should not have logics like you suggested. So, in your case, it will be better that transform AST nodes as a specific node like |
Beta Was this translation helpful? Give feedback.
0 replies
-
Good point, I ended up actually doing this in my code here emad-elsaid/xlog@9f31a67
…On Mon, Jan 2, 2023, 1:20 PM Yusuke Inuzuka ***@***.***> wrote:
I do not stand this idea.
Render should stick to rendering nodes. Renderer should not have logics
like you suggested.
Have a think about case the following:
If anyone wants to render fenced code blocks whose language is alert as a
pdf. He must write same logics as you written for HTML renderers.
So, in your case, it will be better that transform AST nodes as a specific
node likeNoticeBlock. NoticeBlockRenderer will just renderer the nodes
without logics.
—
Reply to this email directly, view it on GitHub
<#345 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAANJAYN5XFTR6WFZNWIOPTWQLBZJANCNFSM6AAAAAATNPGCJE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
alert
orinfo
.I looked into the part that does the node rendering and noticed it returns an error and stops rendering?
goldmark/renderer/renderer.go
Line 168 in 60df4aa
here are my thoughts so far:
WalkFallback
and check if the node renderer returned it so we can continue to use the next renderer in the listI'm interested in knowing:
Beta Was this translation helpful? Give feedback.
All reactions