Guest User

Untitled

a guest
Apr 26th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. Proc.new do |text|
  2. text.scan(/(<code\:([a-z].+?)>(.+?)<\/code>)/m).each do |match|
  3. text.gsub!(match[0],CodeRay.scan(match[2], match[1].to_sym).div(:css => :class))
  4. end
  5. text
  6. end
Add Comment
Please, Sign In to add comment