21316: Merge commit '1416f698b72de4b09350d9c2fb25c1405c3247bc' into 21316-left-panel...
[arvados.git] / doc / zenweb-textile.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: CC-BY-SA-3.0
4
5 require 'zenweb'
6
7 module ZenwebTextile
8   VERSION = '0.0.1'
9 end
10
11 module Zenweb
12   class Page
13     
14     ##
15     # Render a page's textile and return the resulting html
16     def render_textile page, content
17       require 'RedCloth'
18       RedCloth.new(content ? content : self.body).to_html
19     end
20   end
21 end