-
-
Notifications
You must be signed in to change notification settings - Fork 918
Make CustomRender more flexible #298
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
Conversation
Nice job. Looks good. Can you add any concrete example of a typical use? |
For example, I want to add a small inline image between text content, laTeX image in my case, these images should be aligned with text content in baseline instead of center by default. |
What's the status of this merge request? This would be great. |
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 checked this and it is working well. Unfortunately it is also coming with a bunch of unrelated changes and it has a merge conflict with #384 , When that latter PR is merged I'd like to add this PR's code too.
Same as Sub6Resources#298 but only the minimal required changes to make this work
I re-implemented this in #498 with just the minimal changes required to allow |
As @erickok 's comment, this PR can be closed now |
Currently,
CustomRender
returns aWidget
, it makes the application can't manipulate the alignment of theWidgetSpan
which layout of custom tag (it's required in some cases, for example: align an inline image)My pull request will modify
CustomRender
, it will return adynamic
type instead ofWidget
, so the application can returnWidgetSpan
instead ofWidget
. In case of returningWidgetSpan
,html_parser
will return thecustomRender
directly instead of wrapping it inside aWidgetSpan
:With this approach, the application can freely style the
WidgetSpan
of custom tag.