Guest User

Untitled

a guest
Feb 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. @slides = @slides.collect do |slide|
  2. slide = "h1" + slide
  3. body, notes = slide.split("--notes--")
  4. body = RedCloth.new(body, [:no_span_caps]).to_html
  5. body.gsub!(/<code>(.|\s)*<\/code>/) { |match| CodeRay.scan(match, :ruby).div(:line_numbers => :table, :css => :class)}
  6. body.gsub!(/(<code>|<\?code>)/, '')
  7. notes = RedCloth.new(notes, [:no_span_caps]).to_html if notes
  8. {:body => body, :notes => notes}
  9. end
Add Comment
Please, Sign In to add comment