This PR modifies replace_all to avoid the infinite loop. In each iteration, replace_all searches for needle starting from the beginning of haystack. If replacement contains needle, the result is an infinite loop. To prevent this from happening, replace_all should continue searching for needle from the end of the previous replacement.

Squashed and rebased from #1128. Resolves #936.


You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany-plugins/pull/1232

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany-plugins/pull/1232@github.com>