mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Respect invalidate_oneboxes option for inline oneboxes
This commit is contained in:
@@ -100,7 +100,7 @@ function applyOnebox(state, silent) {
|
||||
let options = state.md.options.discourse;
|
||||
|
||||
if (options.lookupInlineOnebox) {
|
||||
onebox = options.lookupInlineOnebox(href);
|
||||
onebox = options.lookupInlineOnebox(href, options.invalidateOneboxes);
|
||||
}
|
||||
|
||||
if (onebox && onebox.title) {
|
||||
|
||||
@@ -31,7 +31,8 @@ export function buildOptions(state) {
|
||||
previewing,
|
||||
linkify,
|
||||
censoredWords,
|
||||
mentionLookup
|
||||
mentionLookup,
|
||||
invalidateOneboxes
|
||||
} = state;
|
||||
|
||||
let features = {
|
||||
@@ -80,7 +81,8 @@ export function buildOptions(state) {
|
||||
markdownIt: true,
|
||||
injectLineNumbersToPreview:
|
||||
siteSettings.enable_advanced_editor_preview_sync,
|
||||
previewing
|
||||
previewing,
|
||||
invalidateOneboxes
|
||||
};
|
||||
|
||||
// note, this will mutate options due to the way the API is designed
|
||||
|
||||
Reference in New Issue
Block a user