Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/parser/DifferentialHunkParser.php
Show First 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | foreach ($old as $key => $o) { | ||||
if ($o['type'] != $n['type']) { | if ($o['type'] != $n['type']) { | ||||
$o_segments = array(); | $o_segments = array(); | ||||
$n_segments = array(); | $n_segments = array(); | ||||
$tab_width = 2; | $tab_width = 2; | ||||
$o_text = $o['text']; | $o_text = $o['text']; | ||||
$n_text = $n['text']; | $n_text = $n['text']; | ||||
if ($o_text !== $n_text) { | if ($o_text !== $n_text && (ltrim($o_text) === ltrim($n_text))) { | ||||
$o_depth = $this->getIndentDepth($o_text, $tab_width); | $o_depth = $this->getIndentDepth($o_text, $tab_width); | ||||
$n_depth = $this->getIndentDepth($n_text, $tab_width); | $n_depth = $this->getIndentDepth($n_text, $tab_width); | ||||
if ($o_depth < $n_depth) { | if ($o_depth < $n_depth) { | ||||
$segment_type = '>'; | $segment_type = '>'; | ||||
$segment_width = $this->getCharacterCountForVisualWhitespace( | $segment_width = $this->getCharacterCountForVisualWhitespace( | ||||
$n_text, | $n_text, | ||||
($n_depth - $o_depth), | ($n_depth - $o_depth), | ||||
▲ Show 20 Lines • Show All 520 Lines • Show Last 20 Lines |