Skip to content

Conversation

@Andrew-McCall
Copy link
Contributor

In the settings, when the saved commitMessage or autoCommitMessage (Text Areas) load a saved value, it adds quotes to the start and end. If you edit the message and don't delete the quotes, it "correctly" escapes the quotes in the field and saves and repeats.

(See image at end, if I'm not being clear)

When loading the value, I've changed it to use String instead of JSON.Stringify so strings are passed as normal, only downside would be an object would show as [object] but this text value would never hold an object, just strings.

This is a tiny fix, No AI. umm. no unit tests either.

Thank you for your time (and great plugin).

image

@Andrew-McCall
Copy link
Contributor Author

In case I'm just rambling, when the saved commit message value is loaded, it would have erroneous quotes added to it in the text boxes.

@Andrew-McCall Andrew-McCall changed the title Fixed: Text Area Quote Bug Bug Fix: Text Area Quotation Sep 23, 2025
@Andrew-McCall Andrew-McCall changed the title Bug Fix: Text Area Quotation Bug Fix: (Tiny Bug) Text Area Quotation Sep 23, 2025
@Andrew-McCall Andrew-McCall changed the title Bug Fix: (Tiny Bug) Text Area Quotation Bug Fix: (Tiny) Text Area Quotation Sep 23, 2025
@Andrew-McCall
Copy link
Contributor Author

image

@Andrew-McCall
Copy link
Contributor Author

My first commit only used String() inplace of JSON.stringify as I wouldn't expect the stored value to ever be an object however the linter wants a more defensive stringify.

Made my intent more clear, if it's a string (or a value that displays as a string - number, bool, string), we String() it. Else its an unexpected value - object, null or undefined, it uses JSON.stringify which matches the other setter's behaviour.

@Vinzent03 Vinzent03 merged commit 69d8b95 into Vinzent03:master Sep 30, 2025
4 of 5 checks passed
Vinzent03 added a commit that referenced this pull request Sep 30, 2025
@Vinzent03
Copy link
Owner

Thanks for the fix! I don't actually think there are values, which are not just string or number in the settings, but this should be solid now.
I somehow messed up the merge, but did it locally now. 806da55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants