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:
epriestley
2011-07-06 11:10:40 -07:00
parent f123abcc5a
commit 70cd8b1b34
3 changed files with 21 additions and 14 deletions

View File

@@ -27,7 +27,6 @@ class DifferentialChangesetParser {
protected $parsedHunk = false;
protected $filename = null;
protected $filetype = null;
protected $missingOld = array();
protected $missingNew = array();
@@ -161,10 +160,7 @@ class DifferentialChangesetParser {
public function setFilename($filename) {
$this->filename = $filename;
if (strpos($filename, '.', 1) !== false) {
$parts = explode('.', $filename);
$this->filetype = end($parts);
}
return $this;
}
public function setHandles(array $handles) {
@@ -723,7 +719,7 @@ class DifferentialChangesetParser {
protected function getHighlightFuture($corpus) {
return $this->highlightEngine->getHighlightFuture(
$this->filetype,
$this->highlightEngine->getLanguageFromFilename($this->filename),
$corpus);
}