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
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
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
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