Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 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 = Hpricot(body)
  6. unless (body/:code).empty?
  7. (body/:code).inner_html = CodeRay.scan((body/:code).inner_html, :ruby)
  8. end
  9. body.to_html
  10. notes = RedCloth.new(notes, [:no_span_caps]).to_html if notes
  11. {:body => body, :notes => notes}
  12. end
Add Comment
Please, Sign In to add comment