There Can Be Only One

Wednesday, February 15, 2012

So I don't forget this

by Richard Vowles

One of the things that that I'm always doing is posting to this blog with the SyntaxHighlighter javascript extension. So to make it easy for myself to remember a bit of code to quickly format the code, I'm posting it here:

'''
code goes <> here
'''.each { c -> print '"><&'.contains(c)?('&#'+(int)c+';'):c }

And it works in the online Groovy console.
Posted by Richard at 9:49 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)
There Can Be Only One
Richard Vowles on Google+
Richard Vowles @ Github

Blog Archive

  • ►  2018 (2)
    • ►  December (2)
  • ►  2017 (1)
    • ►  October (1)
  • ►  2016 (1)
    • ►  April (1)
  • ►  2014 (6)
    • ►  November (2)
    • ►  May (4)
  • ►  2013 (3)
    • ►  November (1)
    • ►  August (2)
  • ▼  2012 (10)
    • ►  April (2)
    • ►  March (4)
    • ▼  February (4)
      • I will defeat you Grails config loader!
      • Bad request errors from Sonatype's Nexus during re...
      • So I don't forget this
      • Android Tablets
  • ►  2011 (3)
    • ►  December (1)
    • ►  October (2)
  • ►  2010 (8)
    • ►  December (1)
    • ►  September (1)
    • ►  June (3)
    • ►  February (3)
  • ►  2009 (9)
    • ►  September (1)
    • ►  May (3)
    • ►  April (3)
    • ►  February (2)
  • ►  2008 (3)
    • ►  November (1)
    • ►  September (1)
    • ►  August (1)
There Can Be Only One

opinions about the tech industry

Simple theme. Powered by Blogger.