discourse/app/assets/javascripts/pretty-text
Martin Brennan cfe4ff8d56
FIX: Make sure html_raw is hoisted in custom markdown cook function (#16050)
When returning the customRenderFn from within buildCustomMarkdownCookFunction
for custom markdown engines (such as the one used by the [chat] transcripts)
we were not hoisting/unhoisting the `html_raw` tokens created by the
transcript, which meant that opts.discourse.hoisted could end up in
a state where it was null, and which caused errors and general unpleasantness.

Instead, we can just call the `cook` function that is already exported
from discourse-markdown-it, that takes care of what we did previously
plus the hoisting.

There is a companion chat commit that adds tests for this, there are
no custom markdown engine usages in core to test with.
2022-02-28 07:54:55 +10:00
..
addon FIX: Make sure html_raw is hoisted in custom markdown cook function (#16050) 2022-02-28 07:54:55 +10:00
app DEV: Move pretty-text into an ember-addon format (#9689) 2020-05-07 12:37:47 -04:00
config DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
engines/discourse-markdown DEV: Add force_quote_link option to PrettyText (#16034) 2022-02-23 16:13:46 +10:00
vendor DEV: Ember Addon needs a vendor dir 2020-05-07 15:45:35 -04:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
index.js REFACTOR: Support bundling our admin section as an ember addon 2020-09-22 15:14:29 -04:00
package.json PERF: Update ember-auto-import and webpack (#15919) 2022-02-14 11:21:39 +00:00