| In: |
libraries/rdocsupport.rb
|
| Parent: | SM::SimpleMarkup |
A simple rdoc markup class which recognizes some additional formatting commands suitable for Wiki use.
# 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