Module: Hoe::Halostatue::ParseUrls
- Included in:
- Hoe
- Defined in:
- lib/hoe/halostatue.rb
Overview
This replaces Hoe#parse_urls with something that works better for Markdown.
Instance Method Summary collapse
-
#parse_urls(text) ⇒ Object
:nodoc:.
Instance Method Details
#parse_urls(text) ⇒ Object
:nodoc:
134 135 136 137 138 139 |
# File 'lib/hoe/halostatue.rb', line 134 def parse_urls text keys = Hoe::URLS_TO_META_MAP.keys.join("|") pattern = %r{^[-+*]\s+(#{keys})\s+::\s+<?(\w+://[^>\s]+)>?}m text.scan(pattern).to_h end |