 if (!renderedHTML) {
        htmlDisplay.innerHTML = '<span style="color: #888;">No content rendered</span>';
        return;
      }

      // Debug: Check if js-beautify loaded
      console.log('js-beautify available:', typeof window.html_beautify);
      console.log('Raw HTML:', renderedHTML);

      // Use js-beautify to properly format the HTML
      let formattedHTML;
      try {
        if (window.html_beautify) {
          formattedHTML = html_beautify(renderedHTML, {
            indent_size: 2,
 