Module: Generators::MarkUp
- Included in:
- HTMLPuppetResource
- Defined in:
- lib/puppet/util/rdoc/generators/puppet_generator.rb
Overview
We’re monkey patching RDoc markup to allow lowercase class1::class2::class3 crossref hyperlinking
Instance Method Summary collapse
- #new_markup(str, remove_para = false) ⇒ Object (also: #markup)
Instance Method Details
#new_markup(str, remove_para = false) ⇒ Object Also known as: markup
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 40 def new_markup(str, remove_para = false) first = @markup.nil? res = old_markup(str, remove_para) if first and !@markup.nil? @markup.add_special(/\b([a-z]\w+(::\w+)*)/, :CROSSREF) # we need to call it again, since we added a rule res = old_markup(str, remove_para) end res end |