Fix title of code boxes in editor in highlighter is choosen
authorMatthias Schmidt <gravatronics@live.com>
Sun, 18 Aug 2019 16:48:46 +0000 (18:48 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 18 Aug 2019 16:48:46 +0000 (18:48 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Code.js

index 28bc7cfc56855c10fe1c4815754e5275b3dc7331..8d88e4bddbcedcede27627d5f683263343082499 100644 (file)
@@ -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,