mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Fix highlighted code in Diffusion
Summary: Ref T3141. This is a hacky fix until we can get something a little more sensible in place. Currently, we sometimes end up with an empty text list, which causes file content to not display. Instead, generate the text list from the corpus if it isn't available. Test Plan: Looked at a previously-broken source listing, saw code. Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T3141 Differential Revision: https://secure.phabricator.com/D5871
This commit is contained in:
parent
991bbb6242
commit
5877026e81
1 changed files with 3 additions and 0 deletions
|
@ -12,6 +12,9 @@ final class DiffusionFileContent {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
public function getTextList() {
|
public function getTextList() {
|
||||||
|
if (!$this->textList) {
|
||||||
|
return phutil_split_lines($this->getCorpus(), $retain_ends = false);
|
||||||
|
}
|
||||||
return $this->textList;
|
return $this->textList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue