Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15382495
D11048.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11048.diff
View Options
diff --git a/src/applications/config/check/PhabricatorSetupCheckPygment.php b/src/applications/config/check/PhabricatorSetupCheckPygment.php
--- a/src/applications/config/check/PhabricatorSetupCheckPygment.php
+++ b/src/applications/config/check/PhabricatorSetupCheckPygment.php
@@ -3,7 +3,6 @@
final class PhabricatorSetupCheckPygment extends PhabricatorSetupCheck {
protected function executeChecks() {
-
$pygment = PhabricatorEnv::getEnvConfig('pygments.enabled');
if ($pygment) {
@@ -47,6 +46,24 @@
->addPhabricatorConfig('environment.append-paths');
}
}
+ } else {
+ $summary = pht('Pygments should be installed and enabled '.
+ 'to provide advanced syntax highlighting.');
+
+ $message = pht('Phabricator can highlight a few languages by default, '.
+ 'but installing and enabling Pygments (a third-party highlighting '.
+ 'tool) will add syntax highlighting for many more languages. '."\n\n".
+ 'For instructions on installing and enabling Pygments, see the '.
+ '%s configuration option.'."\n\n".
+ 'If you do not want to install Pygments, you can ignore this issue.',
+ phutil_tag('tt', array(), 'pygments.enabled'));
+
+ $this
+ ->newIssue('pygments.noenabled')
+ ->setName(pht('Install Pygments to Improve Syntax Highlighting'))
+ ->setSummary($summary)
+ ->setMessage($message)
+ ->addRelatedPhabricatorConfig('pygments.enabled');
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 12:42 PM (1 w, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7482324
Default Alt Text
D11048.diff (1 KB)
Attached To
Mode
D11048: Setup check to install/enable pygments
Attached
Detach File
Event Timeline
Log In to Comment