return parent;
}
}
private String toHTML(SparseFileContent src) {
SafeHtml html;
if (diffPrefs.isIntralineDifference()) {
html = colorLineEdits(src);
} else {
SafeHtmlBuilder b = new SafeHtmlBuilder();
for (int index = src.first(); index < src.size(); index = src.next(index)) {
b.append(src.get(index));
b.append('\n');
}
html = b;
final String r = "<span class=\"wse\"" //
+ " title=\"" + PrettifyConstants.C.wseBareCR() + "\"" //
+ "> </span>$1";
html = html.replaceAll("\r([^\n])", r);
}
if (diffPrefs.isShowWhitespaceErrors()) {
// We need to do whitespace errors before showing tabs, because
// these patterns rely on \t as a literal, before it expands.
//
html = showTabAfterSpace(html);
html = showTrailingWhitespace(html);
}
if (diffPrefs.isShowTabs()) {
String t = 1 < diffPrefs.getTabSize() ? "\t" : "";
html = html.replaceAll("\t", "<span class=\"vt\">\u00BB</span>" + t);
}
return html.asString();
}