Skip to content

Commit 4719139

Browse files
authored
Merge pull request java-diff-utils#36 from koppor/improve-readme.md
Fix linting issues in README.md
2 parents b5eb632 + a4bb85b commit 4719139

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

README.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
# java-diff-utils
22

3-
## Status ##
3+
## Status
4+
45
[![Build Status](https://travis-ci.org/java-diff-utils/java-diff-utils.svg?branch=master)](https://travis-ci.org/java-diff-utils/java-diff-utils)
56
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7eba77f10bed4c2a8d08ac8dc8da4a86)](https://www.codacy.com/app/wumpz/java-diff-utils?utm_source=github.com&utm_medium=referral&utm_content=java-diff-utils/java-diff-utils&utm_campaign=Badge_Grade)
67
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.java-diff-utils/java-diff-utils/badge.svg)](http://maven-badges.herokuapp.com/maven-central/io.github.java-diff-utils/java-diff-utils)
78

9+
## Intro
810

9-
## Intro ##
1011
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.
1112

1213
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.
1314

1415
**This is originally a fork of java-diff-utils from Google Code Archive.**
1516

16-
## Examples ##
17+
## Examples
1718

18-
Look [here](https://github.com/wumpz/java-diff-utils/wiki) to find more helpful informations and examples.
19+
Look [here](https://github.com/wumpz/java-diff-utils/wiki) to find more helpful informations and examples.
1920

2021
These two outputs are generated using this java-diff-utils. The source code can also be found at the *Examples* page:
2122

2223
**Producing a one liner including all difference information.**
2324

2425
This is a test ~senctence~**for diffutils**.
2526

26-
2727
**Producing a side by side view of computed differences.**
2828

2929
|original|new|
@@ -32,23 +32,22 @@ This is a test ~senctence~**for diffutils**.
3232
|This is the second line.|This is the second line.|
3333
|~And here is the finish.~||
3434

35+
## Main Features
3536

36-
## Main Features ##
37-
38-
* computing the difference between two texts.
39-
* capable to hand more than plain ascci. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library
40-
* patch and unpatch the text with the given patch
41-
* parsing the unified diff format
42-
* producing human-readable differences
43-
* inline difference construction
44-
* Algorithms:
45-
* Myer
46-
* HistogramDiff using JGit Library
37+
* computing the difference between two texts.
38+
* capable to hand more than plain ascci. Arrays or List of any type that implements hashCode() and equals() correctly can be subject to differencing using this library
39+
* patch and unpatch the text with the given patch
40+
* parsing the unified diff format
41+
* producing human-readable differences
42+
* inline difference construction
43+
* Algorithms:
44+
* Myer
45+
* HistogramDiff using JGit Library
4746

48-
### Algoritms ###
47+
### Algoritms
4948

5049
* Myer's diff
51-
* HistogramDiff
50+
* HistogramDiff
5251

5352
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.
5453

@@ -91,24 +90,26 @@ Recently a checkstyle process was integrated into the build process. java-diff-u
9190

9291
```java
9392
public static <T> Patch<T> diff(List<T> original, List<T> revised,
94-
BiPredicate<T, T> equalizer) throws DiffException {
95-
if (equalizer != null) {
96-
return DiffUtils.diff(original, revised,
97-
new MyersDiff<>(equalizer));
98-
}
99-
return DiffUtils.diff(original, revised, new MyersDiff<>());
93+
BiPredicate<T, T> equalizer) throws DiffException {
94+
if (equalizer != null) {
95+
return DiffUtils.diff(original, revised,
96+
new MyersDiff<>(equalizer));
97+
}
98+
return DiffUtils.diff(original, revised, new MyersDiff<>());
10099
}
101100
```
102101

103102
This is a valid piece of source code:
103+
104104
* blocks without braces are not allowed
105105
* after control statements (if, while, for) a whitespace is expected
106106
* the opening brace should be in the same line as the control statement
107107

108-
### To Install ###
108+
### To Install
109109

110110
Just add the code below to your maven dependencies:
111-
```
111+
112+
```xml
112113
<dependency>
113114
<groupId>io.github.java-diff-utils</groupId>
114115
<artifactId>java-diff-utils</artifactId>
@@ -118,7 +119,7 @@ Just add the code below to your maven dependencies:
118119

119120
Attention. We changed groupid and artifactid. Starting with version 4 you have to use:
120121

121-
```
122+
```xml
122123
<dependency>
123124
<groupId>io.github.java-diff-utils</groupId>
124125
<artifactId>java-diff-utils</artifactId>
@@ -127,7 +128,8 @@ Attention. We changed groupid and artifactid. Starting with version 4 you have t
127128
```
128129

129130
or using gradle:
130-
```
131+
132+
```groovy
131133
// https://mvnrepository.com/artifact/com.github.wumpz/diffutils
132134
compile group: 'com.github.wumpz', name: 'diffutils', version: '2.2'
133135
```

0 commit comments

Comments
 (0)