bug description:
the bug seems to be caused when the tag has spaces so I say change it to some other text
This is for the "story map"
I believe this was a bug that only happens when the first tag is used with spaces
changed from
addPassageTag(passages: Passage[], tag: string) {
for (const passage of passages) {
if (!passage.tags.some((oldTag) => !oldTag.toLowerCase().localeCompare(tag.trim().toLowerCase()))){
passage.tags.push(tag.trim());
}
}
}
to
addPassageTag(passages: Passage[], tag: string) {
for (const passage of passages) {
// parse for and remove spaces because spaces break the tags change it to a "_"
if (!passage.tags.some((oldTag) => !oldTag.toLowerCase().localeCompare(tag.trim().replace(/\s/g, '_').toLowerCase()))){
passage.tags.push(tag.trim().replace(/\s/g, '_'));
}
}
}
this only changes it so that it uses regex to remove the middle spaces that cause bugs
bug description: the bug seems to be caused when the tag has spaces so I say change it to some other text
This is for the "story map" I believe this was a bug that only happens when the first tag is used with spaces
changed from
to
this only changes it so that it uses regex to remove the middle spaces that cause bugs