Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match and complete partial URIs #15

Open
alecmev opened this issue Jul 31, 2023 · 1 comment
Open

Match and complete partial URIs #15

alecmev opened this issue Jul 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@alecmev
Copy link

alecmev commented Jul 31, 2023

Our code has ticket references in TODO comments which look like so:

// TODO: [ABC-123] Foo

I want to be able to match ABC-123, highlight it as if it were a URI, and direct people to https://example.com/ABC-123. One more optional case to consider is more specific matching with multiple sub-matches, e.g.:

// TODO: [hello, world] Foo

I want to match both hello and world based on the fact that they're surrounded by TODO: [ ... ]. The regular expression for that would look something like TODO:\s\[(\w+)(,\s\w+)*\]. Ideally, this plugin would treat each group as a separate URI.

There's an old plugin that attempts to handle this, RegExLink, but it's broken in several ways, and its ergonomics are much worse than of OpenUri. Is this in the scope of this plugin?

P.S. Thanks for making this!

@jfcherng
Copy link
Member

jfcherng commented Aug 1, 2023

I don't have anything in mind to match arbitrary text (in specific scopes).

@jfcherng jfcherng added the enhancement New feature or request label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants