-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from snebes/docs
readme update and namespace change
- Loading branch information
Showing
86 changed files
with
235 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,42 @@ | ||
## PHP DaisyDiff | ||
# php-daisydiff | ||
|
||
[![PHP Version](https://img.shields.io/packagist/php-v/snebes/php-daisydiff.svg?maxAge=3600)](https://packagist.org/packages/snebes/php-daisydiff) | ||
[![Latest Version](https://img.shields.io/packagist/v/snebes/php-daisydiff.svg?maxAge=3600)](https://packagist.org/packages/snebes/php-daisydiff) | ||
[![Build Status](https://img.shields.io/scrutinizer/build/g/snebes/php-daisydiff.svg?maxAge=3600)](https://scrutinizer-ci.com/g/snebes/php-daisydiff) | ||
[![Code Quality](https://img.shields.io/scrutinizer/g/snebes/php-daisydiff.svg?maxAge=3600)](https://scrutinizer-ci.com/g/snebes/php-daisydiff) | ||
[![Test Coverage](https://img.shields.io/scrutinizer/coverage/g/snebes/php-daisydiff.svg?maxAge=3600)](https://scrutinizer-ci.com/g/snebes/php-daisydiff) | ||
|
||
PHP HTML Diff Engine - DaisyDiff Port | ||
Daisy Diff is a PHP implementation of the [Java library](https://github.com/DaisyDiff/DaisyDiff) that diffs (compares) HTML files. It highlights added and removed words and annotates changes to the styling. | ||
|
||
## Installation | ||
|
||
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): | ||
|
||
``` | ||
composer require snebes/php-daisydiff | ||
``` | ||
|
||
### Usage | ||
|
||
The `DaisyDiff` class can be used to generate a textual representation of the difference between two HTML strings: | ||
|
||
```php | ||
<?php | ||
|
||
use SN\DaisyDiff\DaisyDiff; | ||
|
||
$daisyDiff = new DaisyDiff(); | ||
\printf("%s\n", $daisyDiff->diff('<html><body>The original document</body></html>', '<html><body>The changed document</body></html>')); | ||
``` | ||
|
||
The code above yields the output below: | ||
|
||
```html | ||
<html>The <del class="diff-html-removed">original </del><ins class="diff-html-added">changed </ins>document</html> | ||
``` | ||
## Thanks | ||
|
||
Many thanks to: | ||
|
||
- [Java DaisyDiff](https://github.com/DaisyDiff/DaisyDiff), the original Java version of the DaisyDiff library. | ||
- [gdevanla/assist](https://github.com/gdevanla/assist) from which many of the tests of this library are extracted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.