Skip to content
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

refactor: Refactor to use new rendering logic, fix a series of issues caused by modified msg HTML format. #78

Merged
merged 10 commits into from
Oct 21, 2024

Conversation

nfnfgo
Copy link
Collaborator

@nfnfgo nfnfgo commented Oct 20, 2024

In previous versions of this plugin, the HTML structure and tags type is sometimes modified by the markdown rendering process.

New Rendering Process

The new rendering process design in this PR resolved such issue. The new rendering process try to preserve the original message HTML structure whenever possible, which could largely improve the compatibility of this plugin when running with a bunch of others plugins which's functionality are sensitive of such structure.

About implementation details, we deprecated the "placeholder" approach which previously used to deal with different types of message span (which works more like a blacklist, preserve elements that we can't deal with), instead, the strength the conception of Frag Processor, which will only pick the element that we should deal with, leave all other message span unchanged. (which works more like a whitelist)

Related Issues

Thanks to the new mechanism, lots of issues caused by HTML structure could be resolved, including:

TODO: I will try to provided a more complete and detailed doc describling the new rendering process in this PR.

@nfnfgo nfnfgo marked this pull request as ready for review October 20, 2024 16:44
@nfnfgo nfnfgo merged commit 1c7a514 into v4 Oct 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment