Title: fix(textutil): make template placeholder regex non-greedy by adityagiri3600 · Pull Request #614 · stackql/stackql · GitHub
Open Graph Title: fix(textutil): make template placeholder regex non-greedy by adityagiri3600 · Pull Request #614 · stackql/stackql
X Title: fix(textutil): make template placeholder regex non-greedy by adityagiri3600 · Pull Request #614 · stackql/stackql
Description: Description Fixes placeholder matching in textutil.GetTemplateLikeString by switching from a greedy regex to a non-greedy regex. GetTemplateLikeString is intended to normalize template placeholders {{...}} so matching can work on the surrounding literal text. Using a greedy pattern {{.*}} can consume from the first {{ to the last }} when multiple placeholders exist in one string, collapsing distinct placeholders into one match. Switching to non-greedy {{.*?}} ensures each placeholder is replaced independently, which preserves expected behavior for multi-placeholder inputs. Example: Input: prefix {{one}} middle {{two}} suffix Greedy {{.*}} matches: {{one}} middle {{two}} Non-greedy {{.*?}} matches: {{one}} and {{two}} Type of change Bug fix (non-breaking change to fix a bug). Feature (non-breaking change to add functionality). Breaking change. Other (eg: documentation change). Please explain. Issues referenced. None Evidence Local command run: go test ./pkg/textutil Result: pass ([no test files], package compiles successfully) Checklist: A full round of testing has been completed, and there are no test failures as a result of these changes. The changes are covered with functional and/or integration robot testing. The changes work on all supported platforms. Unit tests pass locally, as per the developer guide. Robot tests pass locally, as per the developer guide. Linter passes locally, as per the developer guide. Variations This is a one-line, non-breaking regex correction in textutil.go with no interface or behavior changes beyond fixing greedy matching for multi-placeholder strings. I ran a targeted package test (go test ./pkg/textutil) as lightweight evidence for this minimal change. I did not run full unit/robot/lint suites for this tiny scoped fix. Tech Debt No technical debt introduced by this change set.
Open Graph Description: Description Fixes placeholder matching in textutil.GetTemplateLikeString by switching from a greedy regex to a non-greedy regex. GetTemplateLikeString is intended to normalize template placeholders...
X Description: Description Fixes placeholder matching in textutil.GetTemplateLikeString by switching from a greedy regex to a non-greedy regex. GetTemplateLikeString is intended to normalize template placeholders...
Opengraph URL: https://github.com/stackql/stackql/pull/614
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e23e946a-41ca-ff40-b64d-06f557a03957 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E5B2:3DF338:38E3F3:4D08E9:6A4D38BE |
| html-safe-nonce | 814d3439ca9018029371b993003ec8a357c0240bc9eeb708d88daf335dcc2d0d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUIyOjNERjMzODozOEUzRjM6NEQwOEU5OjZBNEQzOEJFIiwidmlzaXRvcl9pZCI6IjQwMjc0MjAyMTI4MTg5NTAzMzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 155ca4c0b836bff55cd337c1cbd2e94035880fc10fa78f8b308692bf4db9e6b3 |
| hovercard-subject-tag | pull_request:3259848969 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/stackql/stackql/pull/614/files |
| twitter:image | https://avatars.githubusercontent.com/u/74224708?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/74224708?s=400&v=4 |
| og:image:alt | Description Fixes placeholder matching in textutil.GetTemplateLikeString by switching from a greedy regex to a non-greedy regex. GetTemplateLikeString is intended to normalize template placeholders... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/stackql/stackql git https://github.com/stackql/stackql.git |
| octolytics-dimension-user_id | 95105302 |
| octolytics-dimension-user_login | stackql |
| octolytics-dimension-repository_id | 443987542 |
| octolytics-dimension-repository_nwo | stackql/stackql |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 443987542 |
| octolytics-dimension-repository_network_root_nwo | stackql/stackql |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width