From 890c8213d15424bb714f2ff06d562ca2538c24e4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 17 Aug 2026 06:50:47 +0900 Subject: docs(output-formatter): drop the stale possessive-quantifier TODO The possessive quantifiers in Symfony's tag-matching patterns only suppress backtracking: the open-tag class excludes backslash, so giving a character back can never let the \\. alternative or the closing > match, and the same holds for the close-tag class and >. Removing them is the documented port for performance-only possessive quantifiers, not an approximation waiting on a PCRE engine. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-symfony-console/src/formatter/output_formatter.rs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'crates/shirabe-symfony-console') diff --git a/crates/shirabe-symfony-console/src/formatter/output_formatter.rs b/crates/shirabe-symfony-console/src/formatter/output_formatter.rs index de030e96..311d50fd 100644 --- a/crates/shirabe-symfony-console/src/formatter/output_formatter.rs +++ b/crates/shirabe-symfony-console/src/formatter/output_formatter.rs @@ -280,13 +280,6 @@ impl WrappableOutputFormatterInterface for OutputFormatter { let mut offset: i64 = 0; let mut output = String::new(); - // Accurate PCRE patterns (possessive quantifiers `*+`), unsupported by the - // `regex` crate: - // let open_tag_regex = "[a-z](?:[^\\\\<>]*+ | \\\\.)*"; - // let close_tag_regex = "[a-z][^<>]*+"; - // TODO(pcre): restore the possessive quantifiers once a PCRE-compatible - // engine is available; greedy quantifiers match the same tags here but may - // differ in pathological backtracking cases. let open_tag_regex = "[a-z](?:[^\\\\<>]* | \\\\.)*"; let close_tag_regex = "[a-z][^<>]*"; let mut current_line_length: i64 = 0; -- cgit v1.3.1-4-g156e