zulip/zerver
Zixuan James Li a3a0103d86 markdown: Calculate linkifier precedence in topics.
This uses the linkifier index among the list of linkifiers in the
replacement as the priority to order the replacement order for
patterns in the topic. This avoids having multiple overlapping matches
that each produce a link.

The linkifier with the lowest id will be prioritized when its pattern
overlaps with another. Linkifiers are prioritized over raw URLs.

Note that the same algorithm is used for local echoing and the
backend markdown processor.

Fixes #23715.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-12-13 15:16:20 -08:00
..
actions user_groups: Track acting user for check_delete_user_group. 2022-12-13 14:58:58 -08:00
data_import ci: Check that non-scripts aren’t marked executable. 2022-12-07 09:54:01 -08:00
integration_fixtures/nagios
lib markdown: Calculate linkifier precedence in topics. 2022-12-13 15:16:20 -08:00
management scrub_realm: Exit unsuccessfully when asked to scrub an active realm. 2022-12-05 11:07:48 -08:00
migrations migrations: Fix Python-looped SQL in 0376; don’t crash if no user found. 2022-11-28 20:23:30 -08:00
openapi api-docs: Move include markdown macro files for API documentation. 2022-12-08 12:58:11 -08:00
tests markdown: Calculate linkifier precedence in topics. 2022-12-13 15:16:20 -08:00
tornado exceptions: Update error message for BAD_EVENT_QUEUE_ID. 2022-11-30 17:16:12 -08:00
views user_groups: Track acting user for check_delete_user_group. 2022-12-13 14:58:58 -08:00
webhooks webhooks: Update Zabbix integration documentation. 2022-12-08 12:08:07 -08:00
worker ruff: Fix N818 exception name should be named with an Error suffix. 2022-11-17 16:52:00 -08:00
__init__.py
apps.py sentry: Initialize sentry in AppConfig ready hook. 2022-09-26 12:42:36 -07:00
context_processors.py templates: Rename `OPEN_GRAPH` variables to `PAGE` or `PAGE_METADATA`. 2022-09-06 14:57:06 -07:00
decorator.py ruff: Fix N818 exception name should be named with an Error suffix. 2022-11-17 16:52:00 -08:00
filters.py typing: Fix function signatures. 2021-08-20 05:54:19 -07:00
forms.py ruff: Fix N818 exception name should be named with an Error suffix. 2022-11-17 16:52:00 -08:00
logging_handlers.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
middleware.py scim: Check SCIM tokens using constant-time comparison. 2022-11-16 10:52:48 -05:00
models.py linkifier: Order linkifiers by id on query. 2022-12-13 15:16:20 -08:00
signals.py requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00