Skip to content

error on 2 links without whitespace #4

Open
@ophilon

Description

@ophilon

thank you for wonderful gem.
come accross this error while scan the .md file:

echo 'at [https://github.com/learnbyexample] (https://github.com/learnbyexample)'|ruby -rcommonregex -wne 'puts CommonRegex.get_links($_)'
https://github.com/learnbyexample
https://github.com/learnbyexample

works fine. The same without whitespace hungs until ^C:

echo 'at [https://github.com/learnbyexample](https://github.com/learnbyexample)'|ruby -rcommonregex -wne 'puts CommonRegex.get_links($_)' 
^C/home/ophil/.gem/ruby/gems/commonregex-0.1.1/lib/commonregex.rb:63:in `scan': Interrupt
	from /home/ophil/.gem/ruby/gems/commonregex-0.1.1/lib/commonregex.rb:63:in `get_matches'
	from /home/ophil/.gem/ruby/gems/commonregex-0.1.1/lib/commonregex.rb:46:in `get_links'
	from -e:1:in `<main>'

ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions