mergulhao / mephisto_code_highlighter
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
mergulhao (author)
Sun Feb 24 06:40:30 -0800 2008
commit 76fc46c651dd64ea6406fcd3db900b6c9862ea9b
tree 8a68b099a54c0700bab8044b9407e8e1e654b557
parent 43623026102fcaaa500796538deae87e42859d4d
tree 8a68b099a54c0700bab8044b9407e8e1e654b557
parent 43623026102fcaaa500796538deae87e42859d4d
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README | ||
| |
assets/ | ||
| |
init.rb | ||
| |
install.rb | ||
| |
lib/ | ||
| |
uncompressed/ | ||
| |
uninstall.rb |
README
Better Code Highlighter Macro and Helper For Mephisto ----------------------------------------------------- A small plugin that provides a filter to wrap code that will then be picked up by dp.SyntaxHighlighter(http://code.google.com/p/syntaxhighlighter/) for client side highlighting and one Liquid filter to add required stylesheets/javascripts into your layout. The suggestion sent by mhavila(http://www.mhavila.com/syntax_test.html) to make the syntax be an valid strict html are been used. See this link for details: http://code.google.com/p/syntaxhighlighter/issues/detail?id=25 Usage ----- Ensure the assets were copied to your public folder. After this, add the code_highlighter helper into your layout. For one language support use: {{ 'ruby' | code_highlighter }} For two languages support use: {{ 'ruby' | code_highlighter: 'java' }} For three or more languages, use: {{ 'ruby' | code_highlighter: 'java', 'cpp' }} And so on. I know it's ugly, but I don't know another way to send multiple arguments to a Liquid filter. If you know, please tell me how! Valid languages are: cpp, csharp, css, delphi, java, javascript, php, python, ruby, sql, vb and xml. Then in your posts do: <filter:jscode lang="javascript"> document.someScriptThing = "BOO" </filter:jscode> Misc ---- English is not my native language, so if you find any grammatical error let me know. Credits ------- Originally written by Dan Webb(dan@danwebb.net). The original version can be found here: http://svn.danwebb.net/external/rails/plugins/filtered_column_code_highlighter/trunk/ dp.SyntaxHighlighter is included in this package, but have it's own license, for datails see: http://code.google.com/p/syntaxhighlighter/ (C) Sylvestre Mergulhao 2008 (contato@mergulhao.info) (C) Dan Webb 2006 (dan@danwebb.net) Licensed under a MIT Licence.

