From: Matthias Schmidt Date: Sun, 18 Aug 2019 16:48:46 +0000 (+0200) Subject: Fix title of code boxes in editor in highlighter is choosen X-Git-Tag: 5.2.0_Beta_1~16^2~5^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c1768e1701eb16d96b16359f7245b566d5f84309;p=GitHub%2FWoltLab%2FWCF.git Fix title of code boxes in editor in highlighter is choosen --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Code.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Code.js index 28bc7cfc56..8d88e4bddb 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Code.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Code.js @@ -154,7 +154,7 @@ define(['EventHandler', 'EventKey', 'Language', 'StringUtil', 'Dom/Util', 'Ui/Di highlighter = elData(pre, 'highlighter'); //noinspection JSUnresolvedVariable - highlighter = (this._editor.opts.woltlab.highlighters.hasOwnProperty(highlighter)) ? this._editor.opts.woltlab.highlighters[highlighter] : ''; + highlighter = (this._editor.opts.woltlab.highlighters.indexOf(highlighter) !== -1) ? PrismMeta[highlighter].title : ''; var title = Language.get('wcf.editor.code.title', { file: file,