Closed bjohas closed 4 years ago
I think this was a false alarm.
Does this compare the string length? If yes, then changing ";" to " " doesn't trigger an update. Could you give add the code that actually compares the old/new values as string?
It compares the number of IDs in the set. I agree it's better to use the string to compare, so that'd become
constructor(init: string = '') {
// Changing syntax for separator in aka from ";" or "; " to " " (/ +/ to be precise). Only allow / +/ in future release.
this.aka = new Set(init.split(init.includes(';') ? /; */ : / +/).filter(aka => aka))
this.init = this.toString()
}
add(id: string) {
id = (id || '').trim()
if (id) this.aka.add(id)
return this
}
changed() {
return this.init !== this.toString()
}
Thank you - I'll look at that! There seems to be another issue, where e.g.
AKA: B;C;A
now becomes
AKA: B A B C
I.e. the list is sorted, but the original item is stuck at the front. I could be wrong... will check again tomorrow.
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.269 ("string to compare fixes #72")
Install in Zotero by downloading test build 0.0.30.269, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.271 ("whitespace")
Install in Zotero by downloading test build 0.0.30.271, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.272 ("adding debug fixes #72")
Install in Zotero by downloading test build 0.0.30.272, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.273 ("debug cases fixes #72")
Install in Zotero by downloading test build 0.0.30.273, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.274 ("debugging ...")
Install in Zotero by downloading test build 0.0.30.274, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.275 ("item catch added")
Install in Zotero by downloading test build 0.0.30.275, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.276 ("beta fixed")
Install in Zotero by downloading test build 0.0.30.276, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.277 ("prefix updated")
Install in Zotero by downloading test build 0.0.30.277, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.278 ("Merge branch 'gh-72' of github.com:edtechhub/zotero-edtechhub into gh-72")
Install in Zotero by downloading test build 0.0.30.278, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
:robot: this is your friendly neighborhood build bot announcing test build 0.0.30.279 ("debugger removed")
Install in Zotero by downloading test build 0.0.30.279, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
This line (220) in the source has:
Does this compare the string length? If yes, then changing ";" to " " doesn't trigger an update. Could you give add the code that actually compares the old/new values as string?
I didn't know how to do it as I'm not sure of the types.
Background: In the code, I have changed this line
The intention is to change ";" or "; " to " ". Once I've upgraded all the libraries, we'll change this to:
I suppose the above line could be written like this to cater for both cases: