@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix an issue where lines with more than one pattern match highlighted improperly in Diffusion

Summary:
Ref T13339. If a search pattern matches more than once on a line, we currently render the line incorreclty, duplicating some of the text.

`substr()` is being called as though the third parameter was `end_offset`, but it's actually `length`. Correct the parameter.

Test Plan:
Before:

{F6676625}

After:

{F6676623}

Maniphest Tasks: T13339

Differential Revision: https://secure.phabricator.com/D20695

+1 -1
+1 -1
src/applications/diffusion/view/DiffusionPatternSearchView.php
··· 47 47 $offset = $match[1]; 48 48 if ($cursor != $offset) { 49 49 $output[] = array( 50 - 'text' => substr($string, $cursor, $offset), 50 + 'text' => substr($string, $cursor, ($offset - $cursor)), 51 51 'highlight' => false, 52 52 ); 53 53 }