I'm building a custom renderer, and the output is not textual, but rather a tree of components... FWIW is a Plotly Dash renderer, so I needed to migrate other parts of my code as my renderer doesn't play well with "".join functions and similar.
So I needed to override the render_tokens method, in the other version I changed the finalize method though:
And in the image(self, alt: str, url: str, title: Optional[str] = None) method I noticed that alt it's actually a List[str] .. easy to fix but I wanted to know what to expect for the alt argument.
Moreover if you have other advices for implementing a non-textual renderer I'd be happy :)
I updated from 2.x to 3.x and I noticed there are other changes with respect to the upgrade guide, no big deal but worth to tell you :)
I'm building a custom renderer, and the output is not textual, but rather a tree of components... FWIW is a Plotly Dash renderer, so I needed to migrate other parts of my code as my renderer doesn't play well with
"".join
functions and similar.So I needed to override the
render_tokens
method, in the other version I changed thefinalize
method though:And in the
image(self, alt: str, url: str, title: Optional[str] = None)
method I noticed thatalt
it's actually aList[str]
.. easy to fix but I wanted to know what to expect for thealt
argument.Moreover if you have other advices for implementing a non-textual renderer I'd be happy :)
Thanks for the great work with Mistune!!