Class: YARD::Templates::Helpers::Markup::RDocMarkupToHtml

Inherits:
Object
  • Object
show all
Defined in:
lib/yard/templates/helpers/markup/rdoc_markup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#from_pathObject

Returns the value of attribute from_path.



92
93
94
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 92

def from_path
  @from_path
end

Instance Method Details

#accept_paragraph(*args) ⇒ Object



99
100
101
102
103
104
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 99

def accept_paragraph(*args)
  par = args.last
  text = par.respond_to?(:txt) ? par.txt : par.text
  @hyperlink = text =~ /\{(https?:|mailto:|link:|www\.)/ ? true : false
  super
end

Disable auto-link of URLs



95
96
97
# File 'lib/yard/templates/helpers/markup/rdoc_markup.rb', line 95

def handle_special_HYPERLINK(special) # rubocop:disable Style/MethodName
  @hyperlink ? special.text : super
end