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

Linkification filter replacement maps #21319

Open
derSeddy opened this issue Mar 4, 2022 · 0 comments
Open

Linkification filter replacement maps #21319

derSeddy opened this issue Mar 4, 2022 · 0 comments
Labels
new feature A proposed new feature for the product

Comments

@derSeddy
Copy link

derSeddy commented Mar 4, 2022

I would like to propose a new feature for custom linkification filters.
Imagine the pattern (?P<project>[A-Z]+)#(?P<issue>[0-9]+), this will for example generate project=MMB and issue=123 for the input MMB#123.
What I would like to do now is to map the project to an url, but the mapping is not one to one because MMB is an abbreviation for MeasurementModuleBase and we need the full name to be able to link into our gitlab.
Of course I could just add one pattern for every project, in this case for example MMB#(?P<issue>[0-9]+), but we have quite a lot of projects (about 50) and it would be nice to just provide Zulip with a "translation map", for example in a single text field accepting a map in json format, which is then applied to the project variable before it is handed to the url format string.

Here is an example how the json input could look like:

{
"project": {
  "MMB": "MeasurementModuleBase",
  "TFW": "TestFramework",
  "DSM": "DataStorageModule",
  ...
}
}

This idea was first presented here: https://chat.zulip.org/#narrow/stream/9-issues/topic/Linkification.20filter.20replacement.20maps

Best regards
Seddy

@showell showell added the new feature A proposed new feature for the product label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A proposed new feature for the product
Projects
None yet
Development

No branches or pull requests

2 participants