webgpu / webgpufundamentals

https://webgpufundamentals.org
BSD 3-Clause "New" or "Revised" License
652 stars 96 forks source link

Diff #70

Closed greggman closed 11 months ago

greggman commented 11 months ago

The idea here is instead of manually marking lines with + and - like the current code you'd just past in the old and new code and it would first generate a diff then show a side-by-side diff if the user's window is large enough, else show what it currently shows.

Rather than implement all that myself I tried diff2html

Screenshot 2023-11-19 at 21 01 37

Unfortunately it seems pretty cluttered. That screenshot is with line numbers removed. Maybe it's better? It wasn't clear. It's not like the current version isn't cluttered though you can pick "hide deleted" to unclutter.

Anyway, I didn't want to throw this away so here it is