File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
app/assets/javascripts/discourse/app/static/markdown-it Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { htmlSafe } from "@ember/template" ;
2
+ import { importSync } from "@embroider/macros" ;
3
+ import loaderShim from "discourse-common/lib/loader-shim" ;
2
4
import DiscourseMarkdownIt from "discourse-markdown-it" ;
3
5
import loadPluginFeatures from "./features" ;
4
6
import MentionsParser from "./mentions-parser" ;
5
7
import buildOptions from "./options" ;
6
8
9
+ // Shims the `parseBBCodeTag` utility function back to its old location. For
10
+ // now, there is no deprecation with this as we don't have a new location for
11
+ // them to import from (well, we do, but we don't want to expose the new code
12
+ // to loader.js and we want to make sure the code is loaded lazily).
13
+ //
14
+ // TODO: find a new home for this – the code is rather small so we could just
15
+ // throw it into the synchronous pretty-text package and call it good, but we
16
+ // should probably look into why plugins are needing to call this utility in
17
+ // the first place, and provide better infrastructure for registering bbcode
18
+ // additions instead.
19
+ loaderShim ( "pretty-text/engines/discourse-markdown/bbcode-block" , ( ) =>
20
+ importSync ( "./parse-bbcode-tag" )
21
+ ) ;
22
+
7
23
function buildEngine ( options ) {
8
24
return DiscourseMarkdownIt . withCustomFeatures (
9
25
loadPluginFeatures ( )
Original file line number Diff line number Diff line change
1
+ export { parseBBCodeTag } from "discourse-markdown-it/features/bbcode-block" ;
You can’t perform that action at this time.
0 commit comments