Class: GitHub::Markup::RDoc
- Inherits:
-
Object
- Object
- GitHub::Markup::RDoc
- Defined in:
- lib/github/markup/rdoc.rb
Instance Method Summary collapse
-
#initialize(content) ⇒ RDoc
constructor
A new instance of RDoc.
- #to_html ⇒ Object
Constructor Details
#initialize(content) ⇒ RDoc
Returns a new instance of RDoc.
7 8 9 |
# File 'lib/github/markup/rdoc.rb', line 7 def initialize(content) @content = content end |
Instance Method Details
#to_html ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/github/markup/rdoc.rb', line 11 def to_html simple_markup = SM::SimpleMarkup.new generator = Generators::HyperlinkHtml.new(nil, OpenStruct.new) simple_markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK) simple_markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK) simple_markup.convert(@content, generator) end |