This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This package contains a widget class and two action method classes that the | |
* widget provides to the CController that uses it. | |
* | |
* The controller must register the actions provided by this widget as follows, | |
* in which we assume this package is in the 'extensions' directory under | |
* CWebApplication::$basePath | |
* <code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'redcarpet' | |
require 'pygments.rb' | |
class HTMLwithPygments < Redcarpet::Render::HTML | |
def block_code(code, language) | |
Pygments.highlight(code, :lexer => language.to_sym, :options => { | |
:encoding => 'utf-8' | |
}) |