BrickGrass / StarlightGlimmer

A pixel website utility bot
Other
3 stars 5 forks source link

Clean up the repetition in diff and preview #11

Closed BrickGrass closed 4 years ago

BrickGrass commented 4 years ago

Both of these have 2 functions that do a lot of the same stuff with slight differences mixed in. Pretty inefficient, and I keep updating stuff in one and forgetting to do it in the other, which is a pain. Would all be fixed by either: making one big function that handles both template and non template versions of the command, finding each small part of overlap and creating functions they both call or maybe some combination of the two. Probably the first one though.

BrickGrass commented 4 years ago

Ended up making another a preprocessing function that all versions of the diff command call before calling the method that used to just be used for non-templated diffs. I'll do preview as well soon.

BrickGrass commented 4 years ago

Done preview as well.