RDocSupport::RDocMarkup (Class)

In: libraries/rdocsupport.rb
Parent: SM::SimpleMarkup

A simple rdoc markup class which recognizes some additional formatting commands suitable for Wiki use.

Methods

convert   new  

Public Class methods

[Source]

    # File libraries/rdocsupport.rb, line 15
15:   def initialize
16:     super()
17: 
18:     pre = '(?:\\s|^|\\\\)'
19: 
20:     # links of the form

21:     # [[<url> description with spaces]]

22:     add_special(/((\\)?\[\[\S+?\s+.+?\]\])/,:TIDYLINK)
23: 
24:     # and external references

25:     add_special(/((\\)?(link:|anchor:|http:|mailto:|ftp:|img:|www\.)\S+\w\/?)/,
26:                 :HYPERLINK)
27: 
28:     # <br/>

29:     add_special(%{(#{pre}<br/>)}, :BR)
30: 
31:     # and <center> ... </center>

32:     add_html("center", :CENTER)
33:   end

Public Instance methods

[Source]

    # File libraries/rdocsupport.rb, line 35
35:   def convert(text, handler)
36:         #$stderr.puts text.inspect

37:     res = super
38:     res.sub!(/^<p>\n/, '')
39:     res.sub!(/<\/p>$/, '')
40:     res
41:   end

[Validate]