zulip/zerver/lib/bugdown
Tim Abbott 7ccc8373e2 bugdown: Fix logic for extracting attachment path_id.
In 3892a8afd8, we restructured the
system for managing uploaded files to a much cleaner model where we
just do parsing inside bugdown.

That new model had potentially buggy handling of cases around both
relative URLs and URLS starting with `realm.host`.

We address this by further rewriting the handling of attachments to
avoid regular expressions entirely, instead relying on urllib for
parsing, and having bugdown output `path_id` values, so that there's
no need for any conversions between formats outside bugdowm.

The check_attachment_reference_change function for processing message
updates is significantly simplified in the process.

The new check on the hostname has the side effect of requiring us to
fix some previously weird/buggy test data.

Co-Author-By: Anders Kaseorg <anders@zulipchat.com>
Co-Author-By: Rohitt Vashishtha <aero31aero@gmail.com>
2019-12-12 20:30:26 -08:00
..
__init__.py bugdown: Fix logic for extracting attachment path_id. 2019-12-12 20:30:26 -08:00
api_arguments_table_generator.py bugdown: Cast enum elements to string in APIArgumentsTablePreprocessor. 2019-10-07 11:42:52 -07:00
api_code_examples.py openapi: Specify securityScheme for the API in root level. 2019-12-06 11:19:08 -08:00
fenced_code.py openapi: Suggest the -sS options to curl. 2019-08-17 11:35:08 -07:00
help_emoticon_translations_table.py templates: Fix more low-hanging HTML validation problems. 2019-04-23 13:00:59 -07:00
help_relative_links.py bugdown: Remove unused imports. 2019-02-02 17:25:22 -08:00
help_settings_links.py exports: Update wording on settings page, /help and /features. 2019-08-22 13:17:03 -07:00
include.py bugdown: Remove unused imports. 2019-02-02 17:25:22 -08:00
nested_code_blocks.py bugdown: Remove unused imports. 2019-02-02 17:25:22 -08:00
tabbed_sections.py help: Make minor updates to import-from-mattermost. 2019-04-16 17:49:42 -07:00
testing_mocks.py zerver/lib: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
tlds-alpha-by-domain.txt