Skip to content

Commit

Permalink
Swapped out HTML diff implementation for own, removes tidy depdendancy
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Nov 29, 2020
1 parent bf8716b commit 0b01a77
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 108 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/PageRevisionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use BookStack\Entities\Tools\PageContent;
use BookStack\Entities\Repos\PageRepo;
use BookStack\Exceptions\NotFoundException;
use GatherContent\Htmldiff\Htmldiff;
use Ssddanbrown\HtmlDiff\Diff;

class PageRevisionController extends Controller
{
Expand Down Expand Up @@ -72,7 +72,7 @@ public function changes(string $bookSlug, string $pageSlug, int $revisionId)

$prev = $revision->getPrevious();
$prevContent = $prev->html ?? '';
$diff = (new Htmldiff)->diff($prevContent, $revision->html);
$diff = Diff::excecute($prevContent, $revision->html);

$page->fill($revision->toArray());
// TODO - Refactor PageContent so we don't need to juggle this
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@
"ext-gd": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-tidy": "*",
"ext-xml": "*",
"barryvdh/laravel-dompdf": "^0.8.6",
"barryvdh/laravel-snappy": "^0.4.7",
"doctrine/dbal": "^2.9",
"facade/ignition": "^1.4",
"fideloper/proxy": "^4.0",
"gathercontent/htmldiff": "^0.2.1",
"intervention/image": "^2.5",
"laravel/framework": "^6.18",
"laravel/socialite": "^4.3.2",
Expand All @@ -32,7 +30,8 @@
"socialiteproviders/microsoft-azure": "^3.0",
"socialiteproviders/okta": "^1.0",
"socialiteproviders/slack": "^3.0",
"socialiteproviders/twitch": "^5.0"
"socialiteproviders/twitch": "^5.0",
"ssddanbrown/htmldiff": "^1.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.2.8",
Expand Down
151 changes: 48 additions & 103 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b01a77

Please sign in to comment.