mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Most of this logic is specific to markdown message processing, so we move the code to markdown.js. The only responsibility that we leave with `emoji.js` is to provide us with a list of translations (regex and replacement text). But now `markdown.js` actually (directly) executes those translations against Zulip messages as part of its preprocessing. This should simplify the upcoming mobile conversion. Instead of mobile needing to duplicate this fairly complex function, they will just need to pass us in a list similar to `emoji_translations` inside of `emoji.js`. That code has a comment that shows what the data structure looks like.