Repository navigation
fix: Rename both tags when one is being edited - #3925
Nishthajain7 wants to merge 2 commits into
Conversation
|
The overall approach looks solid and CM6-native |
|
Looks good but for instance where I have not provided a closing tag and I'll rename the current tag then won't it affect the next closing tag. If not please show the demo. |
|
I made a new commit to handle the no closing tag case Screencast.from.2026-02-23.22-47-44.webm |
24e3054 to
fef46c3
Compare
|
Thank you for your suggestions @yugalkaushik I've made the changes |
khanniie
left a comment
There was a problem hiding this comment.
Thank you so much for working on this! It's looking great, just a few comments. Apologies for the very late review.
| margin: #{math.div(10, $base-font-size)}rem; | ||
| height: #{math.div(72, $base-font-size)}rem; | ||
| font-size: #{math.div(16, $base-font-size)}rem; | ||
| text-decoration: underline; |
There was a problem hiding this comment.
What's the reason for this line?
| const tree = syntaxTree(update.state); | ||
| const { doc } = update.state; | ||
|
|
||
| tr.changes.iterChanges((_fromA, _toA, fromB, _toB) => { |
There was a problem hiding this comment.
Is the reason for the underscores to indicate that it's "private"? I think we should avoid this type of naming as we are moving towards typescript and most typescript style guides recommend against this type of naming (https://google.github.io/styleguide/tsguide.html#naming-style)
| closeOnBlur: false | ||
| }; | ||
|
|
||
| const tagSyncAnnotation = Annotation.define(); |
There was a problem hiding this comment.
Could we make a new file for this? Maybe called tagSyncAnnotaiton.js? The stateutils file is getting a bit large
|
Hi! Just FYI I recently did a rather large file cleanup so there may be merge conflicts to address. For this one in particular i still think we should make another file, but the stateUtils.js file has moved to utils/fileState.js |
|
Hi @Nishthajain7 ! Can you check the reviews above and resolve the merge conflicts please? thanks for your patience and work |
Issue:
Fixes #3873
Demo:
Screencast.from.2026-02-22.21-24-21.webm
Changes:
I used syntaxTree from codemirror to traverse through an html tree and find the corresponding closing tag of the opening tag that is being edited.
I have verified that this pull request:
npm run lint)npm run test)npm run typecheck)developbranch.Fixes #123