Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15416513
D21159.id50378.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21159.id50378.diff
View Options
diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php
--- a/src/applications/differential/parser/DifferentialChangesetParser.php
+++ b/src/applications/differential/parser/DifferentialChangesetParser.php
@@ -1714,10 +1714,7 @@
if ($old_file) {
$old_ref->setFile($old_file);
} else {
- $old_data = $this->old;
- $old_data = ipull($old_data, 'text');
- $old_data = implode('', $old_data);
-
+ $old_data = $this->getRawDocumentEngineData($this->old);
$old_ref->setData($old_data);
}
}
@@ -1730,10 +1727,7 @@
if ($new_file) {
$new_ref->setFile($new_file);
} else {
- $new_data = $this->new;
- $new_data = ipull($new_data, 'text');
- $new_data = implode('', $new_data);
-
+ $new_data = $this->getRawDocumentEngineData($this->new);
$new_ref->setData($new_data);
}
}
@@ -1903,4 +1897,20 @@
->setChangesetState($state);
}
+ private function getRawDocumentEngineData(array $lines) {
+ $text = array();
+
+ foreach ($lines as $line) {
+ // If this is a "No newline at end of file." annotation, don't hand it
+ // off to the DocumentEngine.
+ if ($line['type'] == '\\') {
+ continue;
+ }
+
+ $text[] = $line['text'];
+ }
+
+ return implode('', $text);
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 11:44 AM (2 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7713390
Default Alt Text
D21159.id50378.diff (1 KB)
Attached To
Mode
D21159: Don't pass "No newline at end of file." annotations to DocumentEngines as literal diff text
Attached
Detach File
Event Timeline
Log In to Comment