-
Notifications
You must be signed in to change notification settings - Fork 127
HAR-9383 - create comments for imported tracked changes #436
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -462,7 +462,9 @@ const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEd | |
| const getTrackedChangeText = ({ node, mark, trackedChangeType, isDeletionInsertion, deletionNodes = [] }) => { | ||
| const deletionText = deletionNodes.length ? deletionNodes[0].text : null; | ||
|
|
||
| let trackedChangeText = isDeletionInsertion ? nextNode.text : node.text; | ||
| let nextNode = null; // | ||
| let trackedChangeText = isDeletionInsertion ? nextNode?.text : node?.text; | ||
| if (!trackedChangeText) trackedChangeText = ''; | ||
|
|
||
| // If this is a format change, let's get the string of what changes were made | ||
| const isFormatChange = trackedChangeType === TrackFormatMarkName; | ||
|
|
@@ -483,9 +485,12 @@ const createOrUpdateTrackedChangeComment = ({ event, marks, deletionNodes, nodes | |
|
|
||
| let id = attrs.id; | ||
|
|
||
| if (!nodes.length) return; | ||
| // if (!nodes.length) { | ||
| // return; | ||
| // } | ||
|
|
||
| const node = nodes[0]; | ||
| const nextTrackedNode = null; // | ||
| const isDeletionInsertion = ( | ||
| trackedChangeType === TrackDeleteMarkName && nextTrackedNode?.type?.name === TrackInsertMarkName | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yeah, I'll remove some of this. This was left over from the previous iteration of this and prob not needed. I'll clean it up. |
||
| ); | ||
|
|
||
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.
@harbournick - Not sure what you wanted to do here, but
nextNodevariable was not defined.