Update Phabricator for split syntax highlighting API
Summary: I'll clean some of this stuff up in a followup too, but update the callers to use the new explicit filename-based API. Test Plan: Looked at paste, Diffusion and Differential. Reviewed By: tuomaspelkonen Reviewers: tuomaspelkonen, codeblock, jungejason, aran CC: aran, tuomaspelkonen Differential Revision: 600
This commit is contained in:
@@ -179,13 +179,16 @@ class DiffusionBrowseFileController extends DiffusionController {
|
||||
|
||||
list($text_list, $rev_list, $blame_dict) = $file_query->getBlameData();
|
||||
|
||||
$highlightEngine = new PhutilDefaultSyntaxHighlighterEngine();
|
||||
$highlightEngine->setConfig(
|
||||
$highlight_engine = new PhutilDefaultSyntaxHighlighterEngine();
|
||||
$highlight_engine->setConfig(
|
||||
'pygments.enabled',
|
||||
PhabricatorEnv::getEnvConfig('pygments.enabled'));
|
||||
|
||||
$text_list = explode("\n", $highlightEngine->highlightSource($path,
|
||||
implode("\n", $text_list)));
|
||||
$text_list = explode(
|
||||
"\n",
|
||||
$highlight_engine->highlightSource(
|
||||
$highlight_engine->getLanguageFromFilename($path),
|
||||
implode("\n", $text_list)));
|
||||
|
||||
$rows = $this->buildDisplayRows($text_list, $rev_list, $blame_dict,
|
||||
$needs_blame, $drequest, $file_query, $selected);
|
||||
|
||||
Reference in New Issue
Block a user