Last active
May 6, 2017 14:19
-
-
Save JoshCheek/32b07650aacd7de3586eddc1f9809ddc to your computer and use it in GitHub Desktop.
Clojure koans output hilighter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -p | |
# Output hilighter for the Clojure koans: | |
# https://github.com/functional-koans/clojure-koans | |
# written against git commit | |
# 9b3efbb0268794c6f5e5516589bb17ed78000602 | |
gsub /^clojure\.lang\.ExceptionInfo:\s+(.*)$/, | |
"\e[41;37;1m \\1 \e[0m" | |
gsub Regexp.new("#{ENV['PWD']}(?:/(src/koans/))?(.*)(:)?(?:\.\.\.|(\\d+))"), | |
"\\1\e[32m\\2\e[39m\\3\e[34m\\4\e[0m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment