snaptoken / leg

Tools for making step-by-step code walkthroughs
MIT License
130 stars 2 forks source link

Find better way of having Diffs syntax-highlight themselves #16

Closed paigeruten closed 6 years ago

paigeruten commented 6 years ago

Right now they are syntax-highlighted lazily when the Page that contains them is rendered to HTML. And the way it works just seems... messy. I don't know, it feels like there's a better way. Maybe start by having DiffLine's store both the original source and the syntax-highlighted source, instead of replacing the source with the syntax-highlighted version.

paigeruten commented 6 years ago

Moved the syntax-highlighting code into a DiffTransformer. Not sure if it should actually be a diff transformer subclass, but besides that I'm pretty happy with it right now.