From 1a02e2d367b71eca9fc8093ce83fcae50873003d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 Apr 2020 21:06:20 +0000 Subject: quiet "Complex regular subexpression recursion limit" warnings These seem mostly harmless since Perl will just truncate the match and start a new one on a newline boundary in our case. The only downside is we'd end up with redundant tags in HTML. Limiting the number of line matched ourselves with `{1,$NUM}' doesn't seem prudent since lines vary in length, so we continue to defer the job of limiting matches to the Perl regexp engine. I've noticed this warning in practice on 100K+ line patches to locale data. --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index c42654b6..70c10604 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -576,7 +576,7 @@ sub add_text_body { # callback for msg_iter $s .= "\n" unless $s =~ /\n\z/s; # split off quoted and unquoted blocks: - my @sections = split(/((?:^>[^\n]*\n)+)/sm, $s); + my @sections = PublicInbox::MsgIter::split_quotes($s); $s = ''; my $rv = $ctx->{obuf}; if (defined($fn) || $depth > 0 || $err) { -- cgit v1.2.3-24-ge0c7