Pf2eToolsOrg / Pf2eTools

A site dedicated to making playing games with your friends as easy as possible.
https://pf2etools.com/
MIT License
97 stars 63 forks source link

text converter: improve _splitSemiOrComma #294

Closed Jnosh closed 1 year ago

Jnosh commented 1 year ago

NB:

_splitSemiOrComma is used in a lot of places. Contrary to its name, until now it only actually split on commas and not semicolons.

While this change will improve/fix cases where code was written with the expectation that this function split on semicolons, it can also potentially introduce new issues since written code was tested with the old behaviour.

I tested some creature statblocks which seemed to still work fine but things could of course still break on various edge cases or other kinds of entries.

Alternatively, we could rename the existing function to e.g. _splitComma and introduce a new _splitSemiOrComma version and start using that on a case-by-case basis for a "safer" migration.

MrVauxs commented 1 year ago

It's all good