@@ -50,7 +50,6 @@ public class DiffRowGenerator {
50
50
51
51
private final boolean showInlineDiffs ;
52
52
private final boolean ignoreWhiteSpaces ;
53
- private final boolean ignoreBlankLines ;
54
53
private final String InlineOldTag ;
55
54
private final String InlineNewTag ;
56
55
private final String InlineOldCssClass ;
@@ -68,7 +67,6 @@ public class DiffRowGenerator {
68
67
public static class Builder {
69
68
private boolean showInlineDiffs = false ;
70
69
private boolean ignoreWhiteSpaces = false ;
71
- private boolean ignoreBlankLines = false ;
72
70
private String InlineOldTag = "span" ;
73
71
private String InlineNewTag = "span" ;
74
72
private String InlineOldCssClass = "editOldInline" ;
@@ -97,16 +95,6 @@ public Builder ignoreWhiteSpaces(boolean val) {
97
95
return this ;
98
96
}
99
97
100
- /**
101
- * Ignore blank lines in generating diff rows or not.
102
- * @param val the value to set. Default: true.
103
- * @return builder with configured ignoreBlankLines parameter
104
- */
105
- public Builder ignoreBlankLines (boolean val ) {
106
- ignoreBlankLines = val ;
107
- return this ;
108
- }
109
-
110
98
/**
111
99
* Set the tag used for displaying changes in the original text.
112
100
* @param tag the tag to set. Without angle brackets. Default: span.
@@ -177,7 +165,6 @@ public DiffRowGenerator build() {
177
165
private DiffRowGenerator (Builder builder ) {
178
166
showInlineDiffs = builder .showInlineDiffs ;
179
167
ignoreWhiteSpaces = builder .ignoreWhiteSpaces ; //
180
- ignoreBlankLines = builder .ignoreBlankLines ; //
181
168
InlineOldTag = builder .InlineOldTag ;
182
169
InlineNewTag = builder .InlineNewTag ;
183
170
InlineOldCssClass = builder .InlineOldCssClass ;
@@ -211,17 +198,6 @@ public List<DiffRow> generateDiffRows(List<String> original, List<String> revise
211
198
return generateDiffRows (original , revised , DiffUtils .diff (original , revised , equalizer ));
212
199
}
213
200
214
- private List <String > removeBlankLines (List <String > lines ) {
215
- List <String > result = new ArrayList <String >();
216
- for (String line : lines ) {
217
- if (line .trim ().length () == 0 ) {
218
- result .add ("" );
219
- }
220
- result .add (line );
221
- }
222
- return result ;
223
- }
224
-
225
201
/**
226
202
* Generates the DiffRows describing the difference between original and revised texts using the
227
203
* given patch. Useful for displaying side-by-side diff.
0 commit comments