Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions library/vendor/php-diff/SOURCE
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,34 @@
set -ex

# version based on current master 3cb3f7ce6bb8b910f5a41ea1887b1faceba6a7d7
# plus https://github.com/chrisboulton/php-diff/pull/50
# plus pull requests:
# - https://github.com/chrisboulton/php-diff/pull/50
# - https://github.com/chrisboulton/php-diff/pull/51

git clone https://github.com/chrisboulton/php-diff.git

cd php-diff

git fetch origin pull/50/head:pr
git checkout a9f124f81a9436138879e56157c6cced52a6d95b
git show -s
# master
git checkout 3cb3f7ce6bb8b910f5a41ea1887b1faceba6a7d7

# PR #50
git fetch origin pull/50/head:pr-50
git cherry-pick a9f124f81a9436138879e56157c6cced52a6d95b

# PR #51
git fetch origin pull/51/head:pr-51
git cherry-pick cb0d0781bcc6b0ae39d73715c659a6d2717d28e1

git log -4

rm -rf .git
rm -rf .gitignore
rm -rf composer.json
rm -rf example tests phpunit.xml
cd ..

echo "Now you can run:"
echo " rsync -av php-diff/ ./ --delete --exclude=SOURCE --exclude=php-diff/"
echo "and:"
echo " rm -rf php-diff/"
11 changes: 8 additions & 3 deletions library/vendor/php-diff/lib/Diff/Renderer/Html/Array.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,14 @@ protected function formatLines($lines)
*/
private function fixSpaces(array $matches)
{
$spaces = $matches[1];
$count = strlen($spaces);
if($count == 0) {
$count = 0;

if (count($matches) > 1) {
$spaces = $matches[1];
$count = strlen($spaces);
}

if ($count == 0) {
return '';
}

Expand Down