discourse/app/assets/javascripts/pretty-text/addon
Godfrey Chan 9a1695ccc1
DEV: remove markdown-it-bundle and custom build code (#23859)
With Embroider, we can rely on async `import()` to do the splitting
for us.

This commit extracts from `pretty-text` all the parts that are
meant to be loaded async into a new `discourse-markdown-it` package
that is also a V2 addon (meaning that all files are presumed unused
until they are imported, aka "static").

Mostly I tried to keep the very discourse specific stuff (accessing
site settings and loading plugin features) inside discourse proper,
while the new package aims to have some resembalance of a general
purpose library, a MarkdownIt++ if you will. It is far from perfect
because of how all the "options" stuff work but I think it's a good
start for more refactorings (clearing up the interfaces) to happen
later.

With this, pretty-text and app/lib/text are mostly a kitchen sink
of loosely related text processing utilities.

After the refactor, a lot more code related to setting up the
engine are now loaded lazily, which should be a pretty nice win. I
also noticed that we are currently pulling in the `xss` library at
initial load to power the "sanitize" stuff, but I suspect with a
similar refactoring effort those usages can be removed too. (See
also #23790).

This PR does not attempt to fix the sanitize issue, but I think it
sets things up on the right trajectory for that to happen later.

Co-authored-by: David Taylor <david@taylorhq.com>
2023-11-06 16:59:49 +00:00
..
emoji DEV: Update javascript:update_constants rake task following template colocation (#20365) 2023-02-20 06:20:47 +03:00
allow-lister.js DEV: Prevent videos from preloading metadata (#23807) 2023-10-12 13:47:48 -06:00
censored-words.js DEV: Ensure censorFn copes with null regexpList (#17754) 2022-08-02 11:09:51 +01:00
emoji.js FIX: Use only first character when looking up emoji (#22977) 2023-08-04 15:28:58 +02:00
guid.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
highlightjs-aliases.js DEV: Add support for aliases in HighlightJS languages (#20380) 2023-02-23 15:06:06 -05:00
inline-oneboxer.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
mentions.js FEATURE: Enforce mention limits for chat messages (#19034) 2022-12-06 14:54:04 -03:00
oneboxer-cache.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
oneboxer.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
pretty-text.js DEV: remove markdown-it-bundle and custom build code (#23859) 2023-11-06 16:59:49 +00:00
sanitizer.js FIX: skip iframe URLs with relative paths in pretty text sanitizer. (#21714) 2023-05-24 16:14:18 +05:30
text-replace.js DEV: remove markdown-it-bundle and custom build code (#23859) 2023-11-06 16:59:49 +00:00
upload-short-url.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00