perf(mobile): bound the kept error text scan

Find the first line break with firstMatch rather than indexOf, which
retries the pattern at every position, and replace a first line over
twice the limit before removing identity hashes. Note in ADR 0007 that
closing punctuation after a ? or # in a kept line is read as prose.

Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@localhost>
Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
Tom Brow
2026-11-20 13:38:26 -08:00
parent 1b6135c0ca
commit 6a0d9d4e4d
3 changed files with 7 additions and 6 deletions

View File

@@ -325,6 +325,7 @@ void main() {
'The provider FutureProvider<int>#1a2b3(private-marker) was disposed',
),
('a long line', 'state ${'x' * 200} private-marker'),
('a very long line', 'state ${'x' * 500} private-marker'),
];
for (final (name, text) in replaced) {
test('replaces kept text that has $name', () async {