discourse/app/helpers
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
..
application_helper.rb DEV: remove markdown-it-bundle and custom build code (#23859) 2023-11-06 16:59:49 +00:00
common_helper.rb FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
email_helper.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
embed_helper.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
emoji_helper.rb FEATURE: Render emojis on GitHub labels when oneboxing an issue. (#13531) 2021-06-25 14:48:36 -03:00
list_helper.rb
posts_helper.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
qunit_helper.rb DEV: Switch to using standard ember-cli test bundle (#23337) 2023-09-04 17:09:55 +01:00
splash_screen_helper.rb DEV: Correctly strip sourcemap URL from splash-screen js (#22879) 2023-07-31 16:49:27 +01:00
topic_post_bookmarkable_helper.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
topics_helper.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
user_notifications_helper.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00