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.38 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>/) { CodeRay.scan($1, :ruby) }
  6. body.to_html
  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