xwmx / nb

CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
https://xwmx.github.io/nb
GNU Affero General Public License v3.0
6.43k stars 181 forks source link

URL_PATTERNS regex not matching some git url's #215

Closed ohyhyb closed 1 year ago

ohyhyb commented 1 year ago

Hey @xwmx,

Now that _string_is_url is being called with _init_create_home_notebook() the regex fails to validate git url's in the format of git@host.com:user/repo.git i've stumbled upon a regexp which works:

([A-Za-z0-9]+@|http(|s)://)|(http(|s)://[A-Za-z0-9]+@))([A-Za-z0-9.]+(:d+)?)(::|/)([\d\/\w.-]+?)(\.git)

but rather than open a pull request I'll let you decide how best to address this one ;)

Regards

xwmx commented 1 year ago

@ohyhyb Thanks! I added a pattern for this and it's available in version 7.1.1.