mpStart.call(this, html);
WCF.System.Event.fireEvent('com.woltlab.wcf.redactor2', 'codeStart_' + this.$element[0].id);
+
+ // force insert zero-width white space after each <kbd>
+ elBySelAll('kbd', this.$editor[0], function (kbd) {
+ var nextSibling = kbd.nextSibling;
+ if (nextSibling && nextSibling.nodeType === Node.TEXT_NODE && nextSibling.textContent.substr(0, 1) === "\u200B") {
+ return;
+ }
+
+ var textNode = document.createTextNode("\u200B");
+ kbd.parentNode.insertBefore(textNode, nextSibling);
+ });
}).bind(this);
var mpSet = this.code.set;