Permalink
Browse files

`rake lexers`

  • Loading branch information...
1 parent 76f45f0 commit 2cf6d42fd400056a753766c49fce19321792cb64 @defunkt committed Apr 26, 2010
Showing with 26 additions and 0 deletions.
  1. +15 −0 README.md
  2. +11 −0 Rakefile
View
@@ -60,6 +60,21 @@ Becomes this:
Note the `Hi Bobs!`
+## Available Lexers
+
+This is currently only a demo, so we've hardcoded a small number of lexers:
+
+* ruby
+* js
+* python
+* scheme
+
+Use `{{# highlight_scheme}} code {{/ highlight_scheme}}`, for example,
+to activate one of the lexers.
+
+To get a complete list run `rake lexers` in the root of this project.
+
+
## Dependencies
* Pygments
View
@@ -0,0 +1,11 @@
+
+desc "List the available lexers"
+task :lexers do
+ $LOAD_PATH.unshift 'lib'
+ require 'mustache/plugins/syntax_highlighter'
+
+ lexers =
+ Mustache::Plugins::SyntaxHighlighter.instance_methods.grep(/highlight/)
+ puts 'Lexers:'
+ puts lexers.map { |lexer| ' ' + lexer.sub('highlight_', '') }
+end

0 comments on commit 2cf6d42

Please sign in to comment.