discourse/app/assets/javascripts/pretty-text/addon
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
..
emoji FEATURE: Add missing emojis (#15582) 2022-01-14 17:51:13 -03:00
engines FIX: Make sure html_raw is hoisted in custom markdown cook function (#16050) 2022-02-28 07:54:55 +10:00
allow-lister.js FIX: Do not perform link lookup for replaced links (#14742) 2021-10-28 13:27:31 +03:00
censored-words.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
emoji.js FEATURE: Partial match aliases in emoji filter (#15613) 2022-02-01 22:36:48 +01:00
guid.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
inline-oneboxer.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
oneboxer-cache.js DEV: removes jquery usage from onebox (#14683) 2021-10-22 13:15:46 +02:00
oneboxer.js DEV: Allow utility class domFromString to take in strings with multiple top level elements (#15548) 2022-01-12 19:49:24 +08:00
pretty-text.js DEV: Add force_quote_link option to PrettyText (#16034) 2022-02-23 16:13:46 +10:00
sanitizer.js DEV: adds initial support for custom blocks using code fencing (#15743) 2022-02-09 11:23:44 +01:00
upload-short-url.js FIX: Load short upload URLs only once (#15918) 2022-02-16 08:57:20 +02:00
white-lister.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00