diff --git a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php index 6ea62608a0..6ced8bf77b 100644 --- a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php @@ -178,6 +178,9 @@ class DiffusionBrowseFileController extends DiffusionController { list($text_list, $rev_list, $blame_dict) = $file_query->getBlameData(); $highlightEngine = new PhutilDefaultSyntaxHighlighterEngine(); + $highlightEngine->setConfig( + 'pygments.enabled', + PhabricatorEnv::getEnvConfig('pygments.enabled')); $text_list = explode("\n", $highlightEngine->highlightSource($path, implode("\n", $text_list))); diff --git a/src/applications/diffusion/controller/file/__init__.php b/src/applications/diffusion/controller/file/__init__.php index 529bf8288a..8b61c73968 100644 --- a/src/applications/diffusion/controller/file/__init__.php +++ b/src/applications/diffusion/controller/file/__init__.php @@ -9,6 +9,7 @@ phutil_require_module('phabricator', 'applications/diffusion/controller/base'); phutil_require_module('phabricator', 'applications/diffusion/query/filecontent/base'); phutil_require_module('phabricator', 'infrastructure/celerity/api'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phabricator', 'infrastructure/javelin/api'); phutil_require_module('phabricator', 'view/layout/panel');