From 6af0ee26b943d87e25b5d7ff9b8cade6999b3660 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 25 Mar 2021 20:54:39 -0400 Subject: Fix tag disambiguation (#1556) * Update display generator to use new data format for tag disambiguation * Add separator for multiple disambiguations --- ext/js/display/display.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/js/display/display.js') diff --git a/ext/js/display/display.js b/ext/js/display/display.js index 65cc579f..1142f36f 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -806,7 +806,10 @@ class Display extends EventDispatcher { this._tagNotification = new DisplayNotification(this._footerNotificationContainer, node); } - const content = this._displayGenerator.createTagFooterNotificationDetails(tagNode); + const index = this._getClosestDefinitionIndex(tagNode); + const dictionaryEntry = (index >= 0 && index < this._definitions.length ? this._definitions[index] : null); + + const content = this._displayGenerator.createTagFooterNotificationDetails(tagNode, dictionaryEntry); this._tagNotification.setContent(content); this._tagNotification.open(); } -- cgit v1.2.3