Module: Hoe::Halostatue::ParseUrls
- 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:
213 214 215 216 217 218 |
# File 'lib/hoe/halostatue.rb', line 213 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 |