mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Move Pygments handling to libphutil
Test Plan: None. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4875
This commit is contained in:
parent
879c14e13a
commit
b72e7969a1
1 changed files with 0 additions and 8 deletions
|
@ -420,14 +420,6 @@ final class DifferentialChangesetParser {
|
|||
}
|
||||
|
||||
private function getHighlightFuture($corpus) {
|
||||
if (preg_match('/\r(?!\n)/', $corpus)) {
|
||||
// TODO: Pygments converts "\r" newlines into "\n" newlines, so we can't
|
||||
// use it on files with "\r" newlines. If we have "\r" not followed by
|
||||
// "\n" in the file, skip highlighting.
|
||||
$result = phutil_escape_html($corpus);
|
||||
return new ImmediateFuture($result);
|
||||
}
|
||||
|
||||
return $this->highlightEngine->getHighlightFuture(
|
||||
$this->highlightEngine->getLanguageFromFilename($this->filename),
|
||||
$corpus);
|
||||
|
|
Loading…
Reference in a new issue