Closed jazzsequence closed 6 years ago
I think this is happening because we have a space added to genres with the texturize method. All the suffixes that need spaces have them in the string, so an additional space is unnecessary (and probably why we were seeing doublespaces). #10 needs testing but I think this should solve the issue.
I've tested and I see the issue. However, I'm quite unclear (I've run myself in circles) on whether the constants should contain spaces or not. It seems the responsibility of determining the spacing should fall solely in the patterns? https://github.com/BinaryJazz/genrenator/blob/master/inc/genrenator.php#L21 That would alleviate the seesaw effect (as I see it) that we are currently fighting?
I have unofficially decided that the constants should not have spaces. I was trying to use the texturize method to add spaces as needed but that ran into inconsistent results as well. Perhaps the best solution is just to adjust the patterns which seems like it would remove the necessity of having that texturize method.
@binarygary another thing that is playing into this and causing many of the headaches is some prefixes don't have spaces and some suffixes don't have spaces. Everything that is spaced normally tends to work okay but the stuff that needs to be a contraction is more likely to break. I'm considering changing those into separate fragments and adjusting the patterns to accommodate. I've been avoiding that but I'm wondering if it's the best solution.
The suffixes
o
andism
still appear with spaces before them. There might be more but these are the ones I've noticed thus far. Any others observed should be added to this ticket.