helping make GitHub a better place for SCSS
¶ by Rob FrieselThis week, I helped give a little 1 bit back to the GitHub community from which I seem to have forked so much.
About a year ago, I noticed that the Sass/SCSS support was… not quite right. When I wrote the original “10 things I love about Sass” post back in August of 2010, I created a multi-part Gist to go along with it. Now, the SCSS examples got marked with the Sass syntax and never quite looked right. But I paid it no mind (at least it was something) and moved on. Later it occurred to me that it was indeed expecting those to be *.sass
blocks and not *.scss
blocks.
Last weekend, when I put up the code to go along with my “Wrangling the CSS Beast with Sass” post 2, I noticed that the *.scss
was not receiving any syntax highlighting–none at all.
In some ways, this did not come as a huge surprise. Sass and its SCSS syntax are still relatively new to the scene, so I thought… Hmm, maybe they’re just supported yet. So I reached out to the good folks at GitHub to humbly ask that they add support.
Turns out that they use Pygments for syntax highlighting. 3 And/but after tinkering around in Pygments for a little while, I noticed that (though undocumented) Pygments already had support for Haml/Sass and its SCSS syntax. So I hit them back with that info.
Now, if I’d done a little bit more legwork, I’d have discovered Linguist and submitted the patch myself. But… well: I don’t have a good excuse other than I didn’t know.
So on the one hand: Hey! Do your homework next time and really earn something to brag about!
But on the other hand: Hey! Bragging rights! I helped improve GitHub for SCSS users everywhere!
- But really, just a little teeny tiny bit.[↩]
- …to accompany my presentation from VT Code Camp 2011.[↩]
- And really: it was naïve of me to think that they’d’ve just “rolled their own” in-house syntax highlighting mechanism. Seriously. If ever there was a wheel that didn’t need re-inventing, syntax highlighting is that wheel.[↩]
Leave a Reply