Node type change#87
Closed
tg44 wants to merge 9 commits into
Closed
Conversation
tg44
commented
Sep 17, 2024
tg44
left a comment
Author
There was a problem hiding this comment.
I added the remaining todos/infos to the code, if you have any question feel free to ask here!
| track: node.attrs.track.filter(track => track.type !== TrackDeleteMarkName) | ||
| }); | ||
| } else if (action === "revert") { | ||
| //TODO: we should create all of the marks again |
Author
There was a problem hiding this comment.
Here we should import the node recreation based of the marks.
| } | ||
| const res = nodeListHandler.handler([nodeWithChange], docx, false) | ||
| if(res.length > 0) { | ||
| //TODO: here we should diff the old node and a new node, and add the attributes |
Author
There was a problem hiding this comment.
Here we have the new node (as the parsed), and the old node (as res), and we should find out how we could add the correct marks to the "new node".
| * @typedef {(nodes: XmlNode[], docx: ParsedDocx, insideTrackCahange: boolean) => PmNodeJson[]} NodeListHandlerFn | ||
| * @typedef {{handler: NodeListHandlerFn, handlerEntities: NodeHandlerEntry[]}} NodeListHandler | ||
| * | ||
| * @typedef {(nodes: XmlNode[], docx: ParsedDocx, nodeListHandler: NodeListHandler, insideTrackCahange: boolean) => PmNodeJson[]} NodeHandler |
Author
There was a problem hiding this comment.
This could be refactored to node: XmlNode bcs we removed the n to n mapping, and we did an 1 to n which is way easier to think about. (This is really just refactoring the array to a single element.)
superdoc-bot Bot
pushed a commit
that referenced
this pull request
Jun 14, 2026
feat(fonts): make @superdoc-dev/fonts the only bundled-font source (SD-3441) Ported-From-Source-Repo: superdoc/orbit Ported-From-Source-Commit: 73c7e48d83019ee7015cca608841244cca466692 Ported-Public-Prefix: superdoc/public
This file contains hidden or 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
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.
ongoing PR for node type changes