-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat(core): added preserving and managing original markdown formatting for YfmTable #558
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Preview is ready. |
81cbbf0
to
5ac82e2
Compare
63ceb2c
to
4502b3b
Compare
d3m1d0v
reviewed
Feb 6, 2025
makhnatkin
commented
Feb 10, 2025
proposal:
|
…xtensionsManager, parser and serializer
aa432cf
to
8cb9bcb
Compare
d3m1d0v
approved these changes
Feb 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #557
Enhancements in the Markdown Parser and Serializer
Dynamic Modifiers
Dynamic modifiers have been added to the parser
MarkdownParser
and serializerMarkdownSerializer
to enable flexible token, attribute, and node modifications. The changes follow SOLID principles and maintain backward compatibility.Change diagram: illustrates the integration points of the modifiers.
New Modifier Classes
Introduced classes:
MarkdownParserDynamicModifier
andMarkdownSerializerDynamicModifier
. They support configurations with composite keys, allowing shared handlers for different element types.Example:
ExtensionsManager Update
The
ExtensionsManager
has been modified to pass dynamic modifiers to the parser and serializer, enabling their automatic integration and processing.Preserving Raw Markup in
yfm_table
Configurations for dynamic modifiers and a markup manager have been added to ensure proper preservation and restoration of table contents.
Content Hashing for Raw Markup
Introduced classes:
MarkupManager
.The markup manager uses content hashing (UUID v5) to store and accurately restore raw markup during serialization.