ksalzke / open-url-from-note-omnifocus-plugin

9 stars 2 forks source link

Adjust regex to match without trailing "//" #6

Closed kennonb closed 1 year ago

kennonb commented 1 year ago

This might break things I'm unaware of so feel free to decline this. 😊 I noticed that while moving Mail messages into OF it creates URLs like:

message:%IDENTIFIER%3E

The problem is that the current regex requires there to be a trailing // in that URL:

message://%IDENTIFIER%3E

I could just add those, but when I'm dragging 4-5 emails into OF, it becomes a chore to go through each one and modify.

Also I found that my modification then would match on times like 08:00:00, so I made another change so that : can't have a digit directly after it. I don't know of any URLs that do this, but that could cause some unforeseen issue.

To sum up:

ksalzke commented 1 year ago

Thanks @kennonb - seems like a useful change to me; I'll go ahead and accept it!