zulip/zerver/webhooks/slack_incoming
Alex Vandiver f1a8209705 slack_incoming: Fix formatting fixups with overlaps, or at start/end.
The previous regular expression required a `[^\w]` at the start and
end of the match.  This had two unintended effects -- it meant that it
could never match at the start or end of a string, and it meant
that *adjacent* words required *two* non-word characters between them,
as the pattern matches cannot overlap.

Switch to allowing string start/end to anchor the matches, and make
the trailing `[^\w]` be a zero-width look-ahead, to allow the patterns
to overlap.  Also remove the spurious `^` within the inner character
classes, which prevented `*foo^bar*` from matching.  Finally, add
tests to cover the functionality, which was previously untested.
2022-11-29 16:34:16 -08:00
..
fixtures slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
__init__.py
doc.md markdown: Rewrite include plugin without markdown-include. 2022-06-26 17:36:31 -07:00
tests.py slack_incoming: Fix formatting fixups with overlaps, or at start/end. 2022-11-29 16:34:16 -08:00
view.py slack_incoming: Fix formatting fixups with overlaps, or at start/end. 2022-11-29 16:34:16 -08:00