Skip to content

Instantly share code, notes, and snippets.

@jtrupiano
Created April 14, 2010 15:58
Show Gist options
  • Save jtrupiano/365985 to your computer and use it in GitHub Desktop.
Save jtrupiano/365985 to your computer and use it in GitHub Desktop.

Hey Scott, this is the hacky highlighting I did with code snippets in showoff.

Refer to http://i-dont-trust-your-code.heroku.com/ for the presentation and http://github.com/jtrupiano/i_dont_trust_your_code for the code.

In this first example, I am successively highlighting lines of code from a source file. Refer to slides 22-28 in the presentation and 2-environment/3-custom-require.md in the source.

In the second example, I am highlighting lines of code from irb and shell sessions. Refer to slides 6-13 in the presentation and 2-environment/1-environment.md in the source. What I'd really like to be able to further do is highlight individual results from the ls commands on slides 8 and 10, but that was going to be even hackier.

I'm curious if you would have done this differently. I suspect that this may require modifying markdown itself to get a cleaner way to do this. Although perhaps we might be able to preparse $$$highlight me$$$ out of any blocks that would get interpreted as code? I'm not too sure...haven't really dug much further into it at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment