@@ -110,23 +110,32 @@ class _CompareTool {
110110 File (p.join (_reportDir.path, relativeDir, '$basename -after.png' ));
111111 await afterFile.writeAsBytes (afterBytes);
112112
113- _report.writeln ('`$path `\n ' );
113+ _report.writeln ('\n <div class="image">' );
114+ _report.writeln ('\n ### `$path `\n\n ' );
114115 _report.writeln (
115- '})\n ' );
116- _report
117- . writeln ( ' })\n ' );
116+ '- })\n ' );
117+ _report. writeln (
118+ '- })\n ' );
118119 _report
119- .writeln ('})\n ' );
120+ .writeln ('- })\n ' );
121+ _report.writeln ('\n </div>' );
120122 _report.writeln ();
121123 }
122124
123125 await _writeIndexHtml ();
124126 }
125127
126128 Future <void > _writeIndexHtml () async {
129+ final script = await File ('tool/comparison_web.js' ).readAsString ();
130+ final styles = await File ('tool/comparison_web.css' ).readAsString ();
127131 await File (p.join (_reportDir.path, 'index.html' )).writeAsString ([
128- '<html><body>' ,
132+ '<html>' ,
133+ '<head>' ,
134+ '<style>\n $styles \n </style>' ,
135+ '</head>' ,
136+ '<body>' ,
129137 markdownToHtml (_report.toString ()),
138+ '<script>\n $script \n </script>\n ' ,
130139 '</body></html>' ,
131140 ].join ('\n ' ));
132141 }
0 commit comments