zulip/static
Steve Howell 67a487db79 refactor: Extract message_parser module.
I moved four functions, verbatim, to a new module.
They were in message_util before, which led to
filter.js having several accidental indirect
dependencies.

I considered just putting these four functions in
filter.js, but I think it's a nice abstraction boundary
that filter.js delegates actual message parsing, and
the original author apparently had a similar thought
process.

I also wanted to make it so that a casual reader of
filter.js doesn't think we are manipulating DOM. It's
true that we still indirectly require jquery here, but
it's only for parsing, and it seems plausible we would
eventually use a more low-level parser.

I can see us maybe using these functions in something
like MessageListData in the future, so speculatively
splitting them out might future-proof us from some
cyclical dependencies.

I also think it's plausible that we will just modify
our two markdown processors to attach that kind of
metadata to the messages.

Last but not least, I think there might be opportunity
here to simplify the filter tests and remove some of
the zjquery hacks. We would instead just mock the
message_has_* helpers for the filter tests, and then
do more detailed direct testing on the functions
themselves.
2021-03-22 13:21:56 -07:00
..
assets docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
audio notificaiton_sounds: Add some atonal sounds created by @stwime. 2021-02-05 12:28:20 -08:00
generated
html logo: Update Zulip logo. 2020-07-16 01:37:08 -07:00
images logos: Optimize jotform.svg with svgo 2. 2021-03-04 12:24:25 -08:00
js refactor: Extract message_parser module. 2021-03-22 13:21:56 -07:00
shared typeahead: Always rank exact string match first. 2021-02-25 17:55:54 -08:00
styles style: Fix the vertical alignment in message controls. 2021-03-21 17:38:14 -07:00
templates left sidebar: Don't show unstar-all button when redundant. 2021-03-18 15:52:06 -07:00
third refactor: Rename filter to linkifier in frontend code and docs. 2021-03-15 11:19:59 -07:00
.gitignore dependencies: Replace moment.js with date-fns. 2021-02-05 11:04:32 -08:00