aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-17 06:50:47 +0900
committernsfisis <nsfisis@gmail.com>2026-08-17 06:50:47 +0900
commit890c8213d15424bb714f2ff06d562ca2538c24e4 (patch)
tree76b9715349094d4ea75d5a925b080f9cb6bd9331 /crates
parent52a0665acbbe5bf5b8c6875118fb9cdf7952453b (diff)
downloadphp-shirabe-890c8213d15424bb714f2ff06d562ca2538c24e4.tar.gz
php-shirabe-890c8213d15424bb714f2ff06d562ca2538c24e4.tar.zst
php-shirabe-890c8213d15424bb714f2ff06d562ca2538c24e4.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/shirabe-symfony-console/src/formatter/output_formatter.rs7
1 files changed, 0 insertions, 7 deletions
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;