From fc2a2a8d096370cea09ab97e77881dd358b16905 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 1 May 2011 08:24:30 -0700 Subject: [PATCH] Enable Pygments in actual source list renders Summary: I only actually enabled it in Remarkup previously. Test Plan: Created a python diff, got syntax highlighted. Reviewed By: aran Reviewers: aran, tuomaspelkonen, jungejason CC: aran, epriestley Differential Revision: 202 --- .../parser/changeset/DifferentialChangesetParser.php | 3 +++ src/applications/differential/parser/changeset/__init__.php | 1 + 2 files changed, 4 insertions(+) diff --git a/src/applications/differential/parser/changeset/DifferentialChangesetParser.php b/src/applications/differential/parser/changeset/DifferentialChangesetParser.php index f2641b32d0..4b7812f2c8 100644 --- a/src/applications/differential/parser/changeset/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/changeset/DifferentialChangesetParser.php @@ -699,6 +699,9 @@ EOSYNTHETIC; $mask_force = array()) { $this->highlightEngine = new PhutilDefaultSyntaxHighlighterEngine(); + $this->highlightEngine->setConfig( + 'pygments.enabled', + PhabricatorEnv::getEnvConfig('pygments.enabled')); $this->tryCacheStuff(); diff --git a/src/applications/differential/parser/changeset/__init__.php b/src/applications/differential/parser/changeset/__init__.php index 4164de3c3c..2dc0087010 100644 --- a/src/applications/differential/parser/changeset/__init__.php +++ b/src/applications/differential/parser/changeset/__init__.php @@ -14,6 +14,7 @@ phutil_require_module('phabricator', 'applications/differential/storage/changese phutil_require_module('phabricator', 'applications/differential/storage/diff'); phutil_require_module('phabricator', 'applications/differential/view/inlinecomment'); phutil_require_module('phabricator', 'applications/files/uri'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phabricator', 'infrastructure/javelin/markup'); phutil_require_module('phabricator', 'storage/queryfx');