mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
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.
This commit is contained in:
@@ -124,6 +124,17 @@ Adding a comment. Oh, what a comment it is!
|
||||
self.send_and_test_stream_message('commented_v1', expected_topic, expected_message)
|
||||
self.send_and_test_stream_message('commented_v2', expected_topic, expected_message)
|
||||
|
||||
def test_commented_with_two_full_links(self) -> None:
|
||||
expected_topic = "BUG-15: New bug with hook"
|
||||
expected_message = """
|
||||
Leo Franchi commented on [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15) (assigned to **Othello, the Moor of Venice**):
|
||||
|
||||
``` quote
|
||||
This is the [first link](https://google.com) and this is the [second link](https://google.com) and this is the end.
|
||||
```
|
||||
""".strip()
|
||||
self.send_and_test_stream_message('commented_v2_with_two_full_links', expected_topic, expected_message)
|
||||
|
||||
def test_comment_edited(self) -> None:
|
||||
expected_topic = "BUG-15: New bug with hook"
|
||||
expected_message = """
|
||||
|
||||
Reference in New Issue
Block a user