diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-03-25 20:54:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 20:54:39 -0400 |
commit | 6af0ee26b943d87e25b5d7ff9b8cade6999b3660 (patch) | |
tree | f2f2438dc1ae34d802bd3a6c5a991d750eadb59a /ext/js/display/display.js | |
parent | 4be5c8fd9f7860e701d0b7d3c8c0ee934bc60a4f (diff) |
Fix tag disambiguation (#1556)
* Update display generator to use new data format for tag disambiguation
* Add separator for multiple disambiguations
Diffstat (limited to 'ext/js/display/display.js')
-rw-r--r-- | ext/js/display/display.js | 5 |
1 files changed, 4 insertions, 1 deletions
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(); } |