File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -303,30 +303,23 @@ index 0000001..0ddf2ba
303
303
#### StimulusJS with TypeScript
304
304
305
305
``` ts
306
- import { Controller } from " @hotwired/stimulus" ;
306
+ import { Controller } from ' @hotwired/stimulus' ;
307
307
308
- import {
309
- Diff2HtmlUI ,
310
- Diff2HtmlUIConfig ,
311
- } from " diff2html/lib/ui/js/diff2html-ui-slim.js" ;
308
+ import { Diff2HtmlUI , Diff2HtmlUIConfig } from ' diff2html/lib/ui/js/diff2html-ui-slim.js' ;
312
309
313
310
// Requires `yarn add highlight.js`
314
- import " highlight.js/styles/github.css" ;
315
- import " diff2html/bundles/css/diff2html.min.css" ;
311
+ import ' highlight.js/styles/github.css' ;
312
+ import ' diff2html/bundles/css/diff2html.min.css' ;
316
313
317
314
export default class extends Controller {
318
315
connect(): void {
319
- const diff2htmlUi = new Diff2HtmlUI (
320
- this .diffElement ,
321
- this .unifiedDiff ,
322
- this .diffConfiguration
323
- );
316
+ const diff2htmlUi = new Diff2HtmlUI (this .diffElement , this .unifiedDiff , this .diffConfiguration );
324
317
325
318
diff2htmlUi .draw ();
326
319
}
327
320
328
321
get unifiedDiff(): string {
329
- return this .data .get (" unifiedDiff" ) || " " ;
322
+ return this .data .get (' unifiedDiff' ) || ' ' ;
330
323
}
331
324
332
325
get diffElement(): HTMLElement {
@@ -336,7 +329,7 @@ export default class extends Controller {
336
329
get diffConfiguration(): Diff2HtmlUIConfig {
337
330
return {
338
331
drawFileList: true ,
339
- matching: " lines" ,
332
+ matching: ' lines' ,
340
333
};
341
334
}
342
335
}
You can’t perform that action at this time.
0 commit comments