Pinboard-Plus
Pinboard-Plus copied to clipboard
Extra spaces keep getting added to tag list, repeats forever
- Chrome (Mac) v74.0.3729.169
- Exten v2.12.3
Almost perfect Pinboard extension! So far my only nitpick is:
The Tags field gets extra spaces appended to the taglist every time the extension is activated. I believe the problem could be solved by adding a .trim()
function to the code that concatenates the taglist. see PR below
I created a PR: https://github.com/clvrobj/Pinboard-Plus/pull/53 Not sure if it is correct, please take a look
Hi @luckman212 , thanks for raising and fixing this!
The extra space at the end of the tags list is added intentionally, for saving a space user need to typing. User can input the tag immediately after open the popup window without input the space after the tags list.
The problem is actually it should not add the extra space incrementally. IMO adding a .trim()
function before adding the space might be the best solution. I'll also comment in your PR #53 about this.
Thanks.
Thank you @clvrobj
Right now, when clicking on the suggested tag, a space is prepended to the tag, e.g. 'twitter'
becomes ' twitter'
so the automatic extra space is not needed at the end of the taglist.
But, I think it might be better if clicking on the tag instead added 'twitter '
(space at the end) since right now, if taglist is empty, clicking on a suggestion puts an unneeded space at the beginning of the field. I will try to look more closely at the code to see if I can make the adjustment.