From 523cba5da4d4243c2178f8b7b50edff1d5185014 Mon Sep 17 00:00:00 2001 From: vrana Date: Tue, 7 Aug 2012 18:51:47 -0700 Subject: [PATCH] Use Remarkup document link --- src/infrastructure/markup/PhabricatorMarkupEngine.php | 2 ++ .../markup/rule/PhabricatorRemarkupRuleProxyImage.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php index fd03ef3178..c626e9e055 100644 --- a/src/infrastructure/markup/PhabricatorMarkupEngine.php +++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php @@ -383,6 +383,8 @@ final class PhabricatorMarkupEngine { } } + $rules[] = new PhutilRemarkupRuleDocumentLink(); + if ($options['fileproxy']) { $rules[] = new PhabricatorRemarkupRuleProxyImage(); } diff --git a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php index 28519c8b67..4d2f3af0a6 100644 --- a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php +++ b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleProxyImage.php @@ -24,7 +24,7 @@ final class PhabricatorRemarkupRuleProxyImage public function apply($text) { - $filetypes = '(?:\.jpe?g|.png|.gif)'; + $filetypes = '\.(?:jpe?g|png|gif)'; $text = preg_replace_callback( '@[<](\w{3,}://.+?'.$filetypes.')[>]@',