We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7d6913 commit 73d2127Copy full SHA for 73d2127
projects/ngx-diff2html/src/lib/ngx-diff2html.service.ts
@@ -10,7 +10,7 @@ export class NgxDiff2htmlService {
10
11
constructor() { }
12
13
- getDiff(text1: string, text2: string, filename: string) {
+ getDiff(text1: string, text2: string, filename: string = '') {
14
// Get diff
15
const dmp = new diff_match_patch();
16
const chars = dmp.diff_linesToChars_(text1, text2);
@@ -44,7 +44,7 @@ export class NgxDiff2htmlService {
44
return diff;
45
}
46
47
- diffToHTML(diff: string, format: DiffFormat, style: DiffStyle) {
+ diffToHTML(diff: string, format: DiffFormat = 'line-by-line', style: DiffStyle = 'word') {
48
return Diff2Html.getPrettyHtml(diff, {
49
inputFormat: 'diff',
50
matching: 'lines',
0 commit comments