@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.

Minor, don't link commits after a semicolon

Summary: This stops us from trying to capture commit refs in Diffusion URIs.

Auditors: btrahan

+7 -9
+1 -1
src/infrastructure/markup/PhabricatorMarkupEngine.php
··· 41 41 42 42 private $objects = array(); 43 43 private $viewer; 44 - private $version = 11; 44 + private $version = 12; 45 45 46 46 47 47 /* -( Markup Pipeline )---------------------------------------------------- */
+6 -8
src/infrastructure/markup/rule/PhabricatorRemarkupRuleObject.php
··· 1 1 <?php 2 2 3 - /** 4 - * @group markup 5 - */ 6 3 abstract class PhabricatorRemarkupRuleObject 7 4 extends PhutilRemarkupRule { 8 5 ··· 119 116 $boundary = '\\B'; 120 117 } 121 118 122 - // NOTE: The "(?<!#)" prevents us from linking "#abcdef" or similar. The 123 - // "(?<!/)" prevents us from linking things in URLs. The "\b" allows us to 124 - // link "(abcdef)" or similar without linking things in the middle of 125 - // words. 119 + // NOTE: The "(?<!#)" prevents us from linking "#abcdef" or similar. 120 + // The "(?<!/)" prevents us from linking things in URIs. 121 + // The "(?<!;)" prevents linking Diffusion URIs to commits. 122 + // The "\b" allows us to link "(abcdef)" or similar without linking things 123 + // in the middle of words. 126 124 127 125 $text = preg_replace_callback( 128 - '((?<!#)(?<!/)'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?\b)', 126 + '((?<!#)(?<!/)(?<!;)'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?\b)', 129 127 array($this, 'markupObjectReference'), 130 128 $text); 131 129