instance method
auto_linked?
Ruby on Rails 3.0.20
Since v2.3.18 Last seen in v3.0.20 PrivateAvailable in: v2.3.18 v3.0.20
Signature
auto_linked?(left, right)
Detects already linked context or position in the middle of a tag
Parameters
-
leftreq -
rightreq
Source
# File actionpack/lib/action_view/helpers/text_helper.rb, line 524
def auto_linked?(left, right)
(left =~ AUTO_LINK_CRE[0] and right =~ AUTO_LINK_CRE[1]) or
(left.rindex(AUTO_LINK_CRE[2]) and $' !~ AUTO_LINK_CRE[3])
end
Defined in actionpack/lib/action_view/helpers/text_helper.rb line 524
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::TextHelper