Skip to content

Commit

Permalink
rake lexers
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Apr 26, 2010
1 parent 76f45f0 commit 2cf6d42
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -60,6 +60,21 @@ Becomes this:


Note the `Hi Bobs!` 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 ## Dependencies


* Pygments * Pygments
Expand Down
11 changes: 11 additions & 0 deletions Rakefile
@@ -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.