Fix bookmark tag editing to keep/remove tags correctly - #1202
Closed
AruneshDwivedi wants to merge 1 commit into
Closed
Fix bookmark tag editing to keep/remove tags correctly#1202AruneshDwivedi wants to merge 1 commit into
AruneshDwivedi wants to merge 1 commit into
Conversation
SaveBookmarks normalizes tag names to lowercase with collapsed whitespace, but ApiUpdateBookmark matched new tags against stored tags case-sensitively on the raw input. A tag edited with different casing or extra spaces failed to match, so it stayed marked for deletion and was re-added as a duplicate instead of being kept. Matching on the normalized form keeps existing tags and stops creating duplicates.
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.
Editing a bookmark's tags only added new tags and never removed existing ones because ApiUpdateBookmark matched the incoming tag list against the stored tags case-sensitively on the raw text, while SaveBookmarks stores tags normalized to lowercase with collapsed whitespace. A tag whose casing or spacing changed in the edit box failed to match, so it stayed marked for deletion and was then re-inserted as a duplicate. Matching on the normalized name keeps tags that are still present and stops creating duplicates. Fixes #1167.