/* DokuWiki MoaiEditor Highlight.js file Version : 0.5a (May 6, 2026) Author : MoaiTools License : GPL 3 (http://www.gnu.org/licenses/gpl.html) */ /* This is the umbrella class for the syntax highlighting of the editor. */ MoaiEditor.Highlight = class { constructor(outer) { // Arguments this.outer = outer; // Objects this.header = new MoaiEditor.HighlightHeader(this); } // ──────────────────────────────────── highlight (line) { const syntax = line.highlight.syntax; const content = line.querySelector('.moaied-mirror-line-content'); if (syntax == 'header') this.header.highlight(content, syntax, line.text); else content.textContent = line.text; } // ──────────────────────────────────── createHTML(htmlString) { var div = document.createElement('div'); div.innerHTML = htmlString.trim(); return div.firstChild; // Change this to div.childNodes to support multiple top-level nodes. } }; // End Class