class Rouge::Lexer
def find_fancy(str, code=nil, default_options={})
markdown lexer for highlighting internal code blocks.
This is used in the Redcarpet plugin as well as Rouge's own
is raised.
If the code matches more than one lexer then Guesser::Ambiguous
Lexer.find_fancy('guess', "#!/bin/bash\necho Hello, world")
and you can pass a second argument of the code to guess by
* You can pass the special name 'guess' so we guess for you,
Lexer.find_fancy('erb?parent=tex')
* The string you pass can include CGI-style options
Find a lexer, with fancy shiny features.
def find_fancy(str, code=nil, default_options={}) lexer_class, opts = lookup_fancy(str, code, default_options) lexer_class && lexer_class.new(opts) end