RailsCasts Pro episodes are now free!

Learn more or hide this

puchuu's Profile

GitHub User: puchuu

Comments by

Avatar

/usr/bin/rake? ugly enough
replace it with which rake

Avatar

full fix =)

ruby
    html.gsub(/
      \<code
        \s+
          (?:
            lang=
              (?:
                "(.+?)"
              )
              |
              (?:
                '(.+?)'
              )
          )?
        \s*
      \>
      (.*?)
      \<\/code\>
    /mx) do
      CodeRay.scan($3, $2.blank? ? $1 : $2).div(:css => :class);
    end