mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: inline oneboxer min title length of 2
also: cache mini onebox misses as well to cut down traffic
This commit is contained in:
@@ -96,15 +96,15 @@ function applyOnebox(state, silent) {
|
||||
|
||||
if (!isTopLevel(href)) {
|
||||
let onebox = cachedInlineOnebox(href);
|
||||
|
||||
let options = state.md.options.discourse;
|
||||
|
||||
if (options.lookupInlineOnebox) {
|
||||
onebox = options.lookupInlineOnebox(href);
|
||||
}
|
||||
|
||||
if (onebox) {
|
||||
if (onebox && onebox.title) {
|
||||
text.content = onebox.title;
|
||||
} else if (state.md.options.discourse.previewing) {
|
||||
} else if (state.md.options.discourse.previewing && !onebox) {
|
||||
attrs.push(["class", "inline-onebox-loading"]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user