discourse/plugins
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
..
chat PERF: cook message in background (#24227) 2023-11-06 15:45:30 +01:00
checklist DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
discourse-details DEV: remove markdown-it-bundle and custom build code (#23859) 2023-11-06 16:59:49 +00:00
discourse-lazy-videos FIX: Add rel=0 to youtube lazy videos url (#24173) 2023-10-31 08:04:23 -03:00
discourse-local-dates DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
discourse-narrative-bot DEV: Change anonymous_posting_min_trust_level to a group-based setting (#24072) 2023-10-25 11:45:10 +10:00
discourse-presence DEV: Sort imports 2023-10-10 21:46:54 +01:00
footnote DEV: Remove deprecated queue_jobs site setting (#24127) 2023-10-27 11:05:02 +08:00
poll DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
spoiler-alert Update translations (#24078) 2023-10-24 15:53:34 +02:00
styleguide FIX: Correct import path in styleguide (#24092) 2023-10-25 12:13:38 +01:00