|
4 | 4 |
|
5 | 5 | [](https://travis-ci.org/java-diff-utils/java-diff-utils) |
6 | 6 |
|
7 | | -[](https://github.com/java-diff-utils/java-diff-utils/actions?query=workflow%3A%22Java+CI+with+Maven%22) |
| 7 | +[](https://github.com/java-diff-utils/java-diff-utils/actions?query=workflow%3A%22Java+CI+with+Maven%22) |
8 | 8 |
|
9 | 9 | [](https://www.codacy.com/gh/java-diff-utils/java-diff-utils/dashboard?utm_source=github.com&utm_medium=referral&utm_content=java-diff-utils/java-diff-utils&utm_campaign=Badge_Grade) |
10 | 10 |
|
11 | 11 | [](http://maven-badges.herokuapp.com/maven-central/io.github.java-diff-utils/java-diff-utils) |
12 | 12 |
|
13 | 13 | ## Intro |
14 | 14 |
|
15 | | -Diff Utils library is an OpenSource library for performing the comparison operations between texts: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on. |
| 15 | +Diff Utils library is an open source library for performing comparison operations between texts: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on. |
16 | 16 |
|
17 | | -Main reason to build this library was the lack of easy-to-use libraries with all the usual stuff you need while working with diff files. Originally it was inspired by JRCS library and it's nice design of diff module. |
| 17 | +The main reason to build this library was the lack of easy-to-use libraries with all the usual stuff you need while working with diff files. Originally it was inspired by JRCS library and its nice design of diff module. |
18 | 18 |
|
19 | 19 | **This is originally a fork of java-diff-utils from Google Code Archive.** |
20 | 20 |
|
21 | 21 | ## GPG Signature Validation |
22 | 22 |
|
23 | | -The gpg singing key in [KEYS] is used for this projects artifacts. |
| 23 | +The gpg singing key in [KEYS] is used for this project's artifacts. |
24 | 24 |
|
25 | 25 | ## API |
26 | 26 |
|
27 | | -Javadocs of the actual release version: [JavaDocs java-diff-utils](https://java-diff-utils.github.io/java-diff-utils/4.10/docs/apidocs/) |
| 27 | +Javadocs of the actual release version: [Javadocs java-diff-utils](https://java-diff-utils.github.io/java-diff-utils/4.10/docs/apidocs/) |
28 | 28 |
|
29 | 29 | ## Examples |
30 | 30 |
|
31 | | -Look [here](https://github.com/java-diff-utils/java-diff-utils/wiki) to find more helpful informations and examples. |
| 31 | +Look [here](https://github.com/java-diff-utils/java-diff-utils/wiki) to find more helpful information and examples. |
32 | 32 |
|
33 | | -These two outputs are generated using this java-diff-utils. The source code can also be found at the *Examples* page: |
| 33 | +These two outputs are generated using java-diff-utils. The source code can also be found at the *Examples* page: |
34 | 34 |
|
35 | 35 | **Producing a one liner including all difference information.** |
36 | 36 |
|
37 | 37 | ```Java |
38 | | -//create a configured DiffRowGenerator |
| 38 | +// Create a configured DiffRowGenerator |
39 | 39 | DiffRowGenerator generator = DiffRowGenerator.create() |
40 | 40 | .showInlineDiffs(true) |
41 | 41 | .mergeOriginalRevised(true) |
@@ -44,15 +44,15 @@ DiffRowGenerator generator = DiffRowGenerator.create() |
44 | 44 | .newTag(f -> "**") //introduce markdown style for bold |
45 | 45 | .build(); |
46 | 46 |
|
47 | | -//compute the differences for two test texts. |
| 47 | +// Compute the differences for two test texts |
48 | 48 | List<DiffRow> rows = generator.generateDiffRows( |
49 | | - Arrays.asList("This is a test senctence."), |
| 49 | + Arrays.asList("This is a test sentence."), |
50 | 50 | Arrays.asList("This is a test for diffutils.")); |
51 | | - |
| 51 | + |
52 | 52 | System.out.println(rows.get(0).getOldLine()); |
53 | 53 | ``` |
54 | 54 |
|
55 | | -This is a test ~senctence~**for diffutils**. |
| 55 | +This is a test ~sentence~**for diffutils**. |
56 | 56 |
|
57 | 57 | **Producing a side by side view of computed differences.** |
58 | 58 |
|
@@ -64,9 +64,9 @@ DiffRowGenerator generator = DiffRowGenerator.create() |
64 | 64 | .newTag(f -> "**") |
65 | 65 | .build(); |
66 | 66 | List<DiffRow> rows = generator.generateDiffRows( |
67 | | - Arrays.asList("This is a test senctence.", "This is the second line.", "And here is the finish."), |
| 67 | + Arrays.asList("This is a test sentence.", "This is the second line.", "And here is the finish."), |
68 | 68 | Arrays.asList("This is a test for diffutils.", "This is the second line.")); |
69 | | - |
| 69 | + |
70 | 70 | System.out.println("|original|new|"); |
71 | 71 | System.out.println("|--------|---|"); |
72 | 72 | for (DiffRow row : rows) { |
@@ -76,14 +76,14 @@ for (DiffRow row : rows) { |
76 | 76 |
|
77 | 77 | |original|new| |
78 | 78 | |--------|---| |
79 | | -|This is a test ~senctence~.|This is a test **for diffutils**.| |
| 79 | +|This is a test ~sentence~.|This is a test **for diffutils**.| |
80 | 80 | |This is the second line.|This is the second line.| |
81 | 81 | |~And here is the finish.~|| |
82 | 82 |
|
83 | 83 | ## Main Features |
84 | 84 |
|
85 | | -* computing the difference between two texts. |
86 | | -* capable to hand more than plain ascii. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library |
| 85 | +* Computing the difference between two texts. |
| 86 | +* Capable to handle more than plain ASCII. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library |
87 | 87 | * patch and unpatch the text with the given patch |
88 | 88 | * parsing the unified diff format |
89 | 89 | * producing human-readable differences |
@@ -95,10 +95,10 @@ for (DiffRow row : rows) { |
95 | 95 |
|
96 | 96 | ### Algorithms |
97 | 97 |
|
98 | | -* Myer's diff |
| 98 | +* Myers diff |
99 | 99 | * HistogramDiff |
100 | 100 |
|
101 | | -But it can easily replaced by any other which is better for handing your texts. I have plan to add implementation of some in future. |
| 101 | +But it can easily be replaced by any other which is better for handling your texts. I have a plan to add the implementation of some in the future. |
102 | 102 |
|
103 | 103 | ## Source Code conventions |
104 | 104 |
|
@@ -123,7 +123,7 @@ This is a valid piece of source code: |
123 | 123 |
|
124 | 124 | ### To Install |
125 | 125 |
|
126 | | -Just add the code below to your maven dependencies: |
| 126 | +Just add the code below to your Maven dependencies: |
127 | 127 |
|
128 | 128 | ```xml |
129 | 129 | <dependency> |
@@ -133,7 +133,7 @@ Just add the code below to your maven dependencies: |
133 | 133 | </dependency> |
134 | 134 | ``` |
135 | 135 |
|
136 | | -or using gradle: |
| 136 | +or using Gradle: |
137 | 137 |
|
138 | 138 | ```groovy |
139 | 139 | // https://mvnrepository.com/artifact/io.github.java-diff-utils/java-diff-utils |
|