1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-28 23:48:19 +01:00

Unhighlight " No newline at end of file" in Differential

Summary:
It looks like there is really this text written e.g. at https://secure.phabricator.com/D1896#0a6a1957

I am not sure that it is the only place which needs to be fixed.

Test Plan: Display diff with no newline at end of file in Differential.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1900
This commit is contained in:
vrana 2012-03-14 16:45:40 -07:00
parent 900190b2fe
commit 1464c0f2eb
3 changed files with 40 additions and 41 deletions

View file

@ -172,7 +172,7 @@ celerity_register_resource_map(array(
),
'differential-changeset-view-css' =>
array(
'uri' => '/res/4d6b4fc5/rsrc/css/application/differential/changeset-view.css',
'uri' => '/res/de3d6ec7/rsrc/css/application/differential/changeset-view.css',
'type' => 'css',
'requires' =>
array(
@ -1146,17 +1146,6 @@ celerity_register_resource_map(array(
),
'disk' => '/rsrc/js/javelin/lib/Resource.js',
),
0 =>
array(
'uri' => '/res/b6096fdd/rsrc/js/javelin/lib/__tests__/URI.js',
'type' => 'js',
'requires' =>
array(
0 => 'javelin-uri',
1 => 'javelin-php-serializer',
),
'disk' => '/rsrc/js/javelin/lib/__tests__/URI.js',
),
'javelin-stratcom' =>
array(
'uri' => '/res/3afdac66/rsrc/js/javelin/core/Stratcom.js',
@ -1589,6 +1578,17 @@ celerity_register_resource_map(array(
),
'disk' => '/rsrc/js/application/core/KeyboardShortcut.js',
),
0 =>
array(
'uri' => '/res/b6096fdd/rsrc/js/javelin/lib/__tests__/URI.js',
'type' => 'js',
'requires' =>
array(
0 => 'javelin-uri',
1 => 'javelin-php-serializer',
),
'disk' => '/rsrc/js/javelin/lib/__tests__/URI.js',
),
'phabricator-keyboard-shortcut-manager' =>
array(
'uri' => '/res/0be80136/rsrc/js/application/core/KeyboardShortcutManager.js',
@ -1638,17 +1638,6 @@ celerity_register_resource_map(array(
),
'disk' => '/rsrc/js/application/core/PasteFileUpload.js',
),
0 =>
array(
'uri' => '/res/b6096fdd/rsrc/js/javelin/lib/__tests__/URI.js',
'type' => 'js',
'requires' =>
array(
0 => 'javelin-uri',
1 => 'javelin-php-serializer',
),
'disk' => '/rsrc/js/javelin/lib/__tests__/URI.js',
),
'phabricator-prefab' =>
array(
'uri' => '/res/956c8474/rsrc/js/application/core/Prefab.js',
@ -1964,7 +1953,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'25a70a0c' =>
'1cb6883c' =>
array(
'name' => 'differential.pkg.css',
'symbols' =>
@ -1982,7 +1971,7 @@ celerity_register_resource_map(array(
10 => 'phabricator-content-source-view-css',
11 => 'differential-local-commits-view-css',
),
'uri' => '/res/pkg/25a70a0c/differential.pkg.css',
'uri' => '/res/pkg/1cb6883c/differential.pkg.css',
'type' => 'css',
),
'2af849fb' =>
@ -2139,7 +2128,7 @@ celerity_register_resource_map(array(
'aphront-crumbs-view-css' => '78e8854e',
'aphront-dialog-view-css' => '78e8854e',
'aphront-form-view-css' => '78e8854e',
'aphront-headsup-action-list-view-css' => '25a70a0c',
'aphront-headsup-action-list-view-css' => '1cb6883c',
'aphront-list-filter-view-css' => '78e8854e',
'aphront-pager-view-css' => '78e8854e',
'aphront-panel-view-css' => '78e8854e',
@ -2147,16 +2136,16 @@ celerity_register_resource_map(array(
'aphront-table-view-css' => '78e8854e',
'aphront-tokenizer-control-css' => '78e8854e',
'aphront-typeahead-control-css' => '78e8854e',
'differential-changeset-view-css' => '25a70a0c',
'differential-core-view-css' => '25a70a0c',
'differential-changeset-view-css' => '1cb6883c',
'differential-core-view-css' => '1cb6883c',
'differential-inline-comment-editor' => 'd87369d5',
'differential-local-commits-view-css' => '25a70a0c',
'differential-revision-add-comment-css' => '25a70a0c',
'differential-revision-comment-css' => '25a70a0c',
'differential-revision-comment-list-css' => '25a70a0c',
'differential-revision-detail-css' => '25a70a0c',
'differential-revision-history-css' => '25a70a0c',
'differential-table-of-contents-css' => '25a70a0c',
'differential-local-commits-view-css' => '1cb6883c',
'differential-revision-add-comment-css' => '1cb6883c',
'differential-revision-comment-css' => '1cb6883c',
'differential-revision-comment-list-css' => '1cb6883c',
'differential-revision-detail-css' => '1cb6883c',
'differential-revision-history-css' => '1cb6883c',
'differential-table-of-contents-css' => '1cb6883c',
'diffusion-commit-view-css' => '61f9d480',
'javelin-behavior' => '4fbae2af',
'javelin-behavior-aphront-basic-tokenizer' => '2af849fb',
@ -2205,7 +2194,7 @@ celerity_register_resource_map(array(
'maniphest-task-summary-css' => '31583232',
'maniphest-transaction-detail-css' => '31583232',
'phabricator-app-buttons-css' => '78e8854e',
'phabricator-content-source-view-css' => '25a70a0c',
'phabricator-content-source-view-css' => '1cb6883c',
'phabricator-core-buttons-css' => '78e8854e',
'phabricator-core-css' => '78e8854e',
'phabricator-directory-css' => '78e8854e',
@ -2215,7 +2204,7 @@ celerity_register_resource_map(array(
'phabricator-keyboard-shortcut' => '95944588',
'phabricator-keyboard-shortcut-manager' => '95944588',
'phabricator-menu-item' => '95944588',
'phabricator-object-selector-css' => '25a70a0c',
'phabricator-object-selector-css' => '1cb6883c',
'phabricator-paste-file-upload' => '95944588',
'phabricator-remarkup-css' => '78e8854e',
'phabricator-shaped-request' => 'd87369d5',

View file

@ -202,8 +202,6 @@ final class DifferentialChangesetParser {
$char = $line[0];
if ($char == ' ') {
$types[$line_index] = null;
} else if ($char == '\\' && $line_index > 0) {
$types[$line_index] = $types[$line_index - 1];
} else {
$types[$line_index] = $char;
}
@ -229,6 +227,10 @@ final class DifferentialChangesetParser {
'text' => (string)substr($lines[$cursor], 1),
'line' => $new_line,
);
if ($type == '\\' && $cursor > 1) {
$type = $types[$cursor - 1];
$data['text'] = ltrim($data['text']);
}
switch ($type) {
case '+':
$this->new[] = $data;
@ -1336,7 +1338,9 @@ final class DifferentialChangesetParser {
$o_text = isset($this->oldRender[$ii]) ? $this->oldRender[$ii] : null;
$o_attr = null;
if ($this->old[$ii]['type']) {
if (empty($this->new[$ii])) {
if ($this->old[$ii]['type'] == '\\') {
$o_attr = ' class="comment"';
} elseif (empty($this->new[$ii])) {
$o_attr = ' class="old old-full"';
} else {
$o_attr = ' class="old"';
@ -1367,7 +1371,9 @@ final class DifferentialChangesetParser {
$n_cov = '<td class="cov '.$cov_class.'"></td>';
if ($this->new[$ii]['type']) {
if (empty($this->old[$ii])) {
if ($this->new[$ii]['type'] == '\\') {
$n_attr = ' class="comment"';
} elseif (empty($this->old[$ii])) {
$n_attr = ' class="new new-full"';
} else {
$n_attr = ' class="new"';

View file

@ -75,6 +75,10 @@
background: #aaffaa;
}
.differential-diff td.comment {
background: #dddddd;
}
.differential-diff td.cov {
width: 12px;
padding: 0;