Commit 4e4fc05
authored
fix(super-editor): structural text.rewrite for multi-block replacements (#2733)
* fix(super-editor): create paragraph nodes for multi-block text.rewrite on range targets
* fix(super-editor): split replacement text on paragraph breaks for multi-paragraph rewrites
* Revert "fix(super-editor): split replacement text on paragraph breaks for multi-paragraph rewrites"
This reverts commit 429b207.
* Revert "fix(super-editor): create paragraph nodes for multi-block text.rewrite on range targets"
This reverts commit 1284c55.
* fix(super-editor): implement structural text.rewrite for multi-block replacements
- Added support for replacing entire textblocks with multiple paragraphs when the replacement text normalizes to multiple blocks.
- Enhanced the `executeTextRewrite` function to handle structural rewrites and maintain paragraph attributes.
- Introduced utility functions to manage text range and paragraph node creation for improved text handling during rewrites.
* docs(system-prompt): add clarification on document structure and paragraph identification
* fix(super-editor): address PR review β shared identity helper, position-based textblock check
* fix(super-editor): preserve multi-block tracked rewrites1 parent a995731 commit 4e4fc05
File tree
9 files changed
+1463
-106
lines changed- examples/collaboration/ai-node-sdk
- packages
- sdk
- langs
- browser/src
- node/src/runtime
- tools
- super-editor/src/editors/v1
- document-api-adapters/plan-engine
- extensions/track-changes/trackChangesHelpers
9 files changed
+1463
-106
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
113 | 127 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
130 | | - | |
| 137 | + | |
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| |||
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
0 commit comments