Add a syntax highlight dropdown, if pygments is enabled.
Summary: - Add a default list of supported languages to default.conf.php and make the initial/default value customizable. - Store a '' in the database to infer the language from the filename/title. Test Plan: Tested in my sandbox with pygments enabled and disabled and various combinations of filename/extension/dropdown selection. Reviewers: epriestley CC: Differential Revision: 587
This commit is contained in:
@@ -96,7 +96,7 @@ class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||
|
||||
$text_list = explode(
|
||||
"\n", $highlightEngine->highlightSource(
|
||||
$paste->getTitle(),
|
||||
nonempty($paste->getLanguage(), $paste->getTitle()),
|
||||
$file->loadFileData()));
|
||||
|
||||
$rows = $this->buildDisplayRows($text_list);
|
||||
|
||||
Reference in New Issue
Block a user