refactor: Refactor to use new rendering logic, fix a series of issues caused by modified msg HTML format. #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.