gospin icon indicating copy to clipboard operation
gospin copied to clipboard

Invalid result when the same block (e.g. {hello|hi}) is used in level 1 and then in higher levels.

Open far4599 opened this issue 3 years ago • 1 comments

Hi, i came across the bug that this package spins text like this with invalid result:

original string:
The {slow|quick} {brown|blue and {red|yellow}} {fox|deer} {gracefully |}jumps over the {{slow|quick} {fox|deer}}

result:
The slow blue and yellow fox jumps over the deer}

The problem is that on level!=1 you used block replacement in the original string. So when we are in nested block "{{slow|quick} {fox|deer}}" this replacement is applied to the first occurrence of "{slow|quick}" in the original string.

I've made a fix and will provide pull request soon.

far4599 avatar May 12 '21 09:05 far4599

Sorry, I don't know how to link this issue with the pull request.)

far4599 avatar May 12 '21 09:05 far4599