sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rouge::Lexer.find_fancy
Find a lexer, with fancy shiny features.
* The string you pass can include CGI-style options
Lexer.find_fancy('erb?parent=tex')
* You can pass the special name 'guess' so we guess for you,
and you can pass a second argument of the code to guess by
Lexer.find_fancy('guess', "#!/bin/bash\necho Hello, world")
This is used in the Redcarpet plugin as well as Rouge's own
markdown lexer for highlighting internal code blocks.Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/rouge/lib/rouge/lexer.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rouge--Lexer-find_fancy-for-pr
# Commit to gitgit add app/server/ruby/vendor/rouge/lib/rouge/lexer.rbgit commit -m "better docs for Rouge::Lexer.find_fancy"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rouge--Lexer-find_fancy-for-pr
hub pull-request
# Celebrate!