Carlo Teubner 22811471ac
Improve Entry placeholder resolution (#10846)
* Entry placeholder resolution: don't overdo it

After resolving placeholders, previously the code would do it all over again if anything had changed, multiple times up to the recursion limit. This would have the effect of applying a much greater recursion limit, which is confusing and unnecessary, and probably undesired.

* Entry tweaks and minor refactoring

- Entry::size(): when computing tag size, use same delimiter set as in other places in the code
- Factor tag delimiter set regex out into global constant
- Placeholder resolution: remove unnecessary special casing for self-referential placeholders (these are taken care of by existing recursion depth limit)
- Placeholder resolution: less wasteful string building loop
- Move some constants from being public static data members of Entry to being local to Entry.cpp (in anonymous namespace)
- Migrate some QRegEx instances to QRegularExpression, the modern alternative
- Miscellanous minor code cleanups

* Entry: fix hitting recursion limit with {braces}

When encountering a {brace-enclosed} substring, the placeholder resolution logic would previously keep recursing until it hit the recursion depth limit (currently 10). This would lead to "Maximum depth of replacement has been reached" messages, and was also wasting CPU cycles.

Fixes #1741

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2024-06-16 17:20:16 -04:00
..
2021-07-13 22:08:33 -04:00
2018-03-31 16:01:30 -04:00
2015-09-12 13:55:50 +02:00
2017-10-21 13:15:02 +02:00
2024-01-30 18:26:45 -05:00
2024-02-04 11:50:52 -05:00
2021-08-22 18:30:43 -04:00
2023-07-15 15:28:16 -04:00
2023-07-15 15:28:16 -04:00
2022-09-22 06:49:07 -04:00
2023-08-05 07:29:14 -04:00
2023-08-05 07:29:14 -04:00
2024-03-09 15:21:46 -05:00
2024-02-04 11:50:52 -05:00
2019-03-19 18:56:17 -04:00
2024-03-09 15:21:46 -05:00