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

webhooks/jira: Fix markup conversion of full links #12387

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@davidtwco
Copy link
Contributor

commented May 23, 2019

This PR modifies the regex used when parsing JIRA's full links of
the form [text|link] so that if you have two in a message, Zulip
markup conversion doesn't think that the first link extends to the
closing ] of the second link.

Testing Plan:
I've added a new test that would have been incorrect before this change.

GIFs or Screenshots:
Before this fix, the following comment sent in JIRA:

This is the [first link|https://google.com] and this is the [second link|https://google.com] and this is the end.

Would result in the two full links being converted incorrectly, as shown below:

image

This is the [first link](https://google.com] and this is the [second link|https://google.com) and this is the end.

After this fix, they are converted correctly:

image

This is the [first link](https://google.com) and this is the [second link](https://google.com) and this is the end.
webhooks/jira: Fix markup conversion of full links
This commit modifies the regex used when parsing JIRA's full links of
the form `[text|link]` so that if you have two in a message, Zulip
markup conversion doesn't think that the first link extends to the
closing `]` of the second link.

@zulipbot zulipbot added the size: XL label May 23, 2019

@davidtwco

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

CI failures are spurious and unrelated to the PR.

@timabbott

This comment has been minimized.

Copy link
Member

commented May 28, 2019

Great, merged, thanks @davidtwco!

@timabbott timabbott closed this May 28, 2019

@davidtwco davidtwco deleted the davidtwco:jira-fix-full-links branch May 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.