[{"data":1,"prerenderedAt":57},["Reactive",2],{"blog-post-markdown-code-syntax-highlighting-advanced-techniques":3},{"slug":4,"title":5,"description":6,"excerpt":7,"date":8,"category":9,"author":10,"keywords":11,"readingMinutes":12,"html":13,"headings":14,"tools":31,"related":32},"markdown-code-syntax-highlighting-advanced-techniques","Advanced Markdown Code Syntax Highlighting: Complete Guide for Multi-Language Support, Custom Themes, and Interactive Documentation","Master advanced code syntax highlighting in Markdown with comprehensive language support, custom theme creation, interactive examples, and modern rendering techniques for professional technical documentation.","Advanced Markdown code syntax highlighting transforms static code examples into visually rich, interactive documentation that enhances readability, comprehension, and user engagement across…","2025-12-21","Tutorial","Matthew Rathbone","markdown syntax highlighting, code highlighting markdown, multi-language syntax, custom highlighting themes, markdown code blocks, syntax highlighter integration, technical documentation markdown, code formatting markdown",27,"\u003Cp>Advanced Markdown code syntax highlighting transforms static code examples into visually rich, interactive documentation that enhances readability, comprehension, and user engagement across technical content. By implementing sophisticated syntax highlighting systems, custom theme integration, and intelligent language detection, technical writers can create comprehensive documentation that effectively communicates complex programming concepts while maintaining consistency across diverse codebases and programming languages.\u003C/p>\n\u003Ch2 id=\"why-implement-advanced-syntax-highlighting\">Why Implement Advanced Syntax Highlighting?\u003C/h2>\n\u003Cp>Professional syntax highlighting provides essential benefits for technical documentation:\u003C/p>\n\u003Cul>\n\u003Cli>\u003Cstrong>Code Readability\u003C/strong>: Enhanced visual distinction between syntax elements improves code comprehension\u003C/li>\n\u003Cli>\u003Cstrong>Language Support\u003C/strong>: Comprehensive highlighting for 200+ programming languages and markup formats\u003C/li>\n\u003Cli>\u003Cstrong>Theme Customization\u003C/strong>: Brand-consistent highlighting that matches documentation design systems\u003C/li>\n\u003Cli>\u003Cstrong>Interactive Features\u003C/strong>: Copy buttons, line numbers, and collapsible sections enhance user experience\u003C/li>\n\u003Cli>\u003Cstrong>Accessibility\u003C/strong>: High-contrast themes and screen reader compatibility ensure inclusive documentation\u003C/li>\n\u003Cli>\u003Cstrong>Performance\u003C/strong>: Optimized rendering engines handle large code blocks without impacting page load times\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"foundation-syntax-highlighting-systems\">Foundation Syntax Highlighting Systems\u003C/h2>\n\u003Ch3 id=\"prismjs-advanced-implementation\">Prism.js Advanced Implementation\u003C/h3>\n\u003Cp>Setting up comprehensive syntax highlighting with Prism.js and modern extensions:\u003C/p>\n\u003Cpre>\u003Ccode class=\"hljs language-javascript\">\u003Cspan class=\"hljs-comment\">// prism-advanced-setup.js - Advanced Prism.js configuration\u003C/span>\n\u003Cspan class=\"hljs-keyword\">class\u003C/span> \u003Cspan class=\"hljs-title class_\">AdvancedPrismHighlighter\u003C/span> {\n    \u003Cspan class=\"hljs-title function_\">constructor\u003C/span>(\u003Cspan class=\"hljs-params\">options = {}\u003C/span>) {\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span> = {\n            \u003Cspan class=\"hljs-attr\">theme\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;default&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">languages\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;javascript&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;python&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;java&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;cpp&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;bash&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-attr\">enableLineNumbers\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">enableCopyButton\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">enableLanguageLabels\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">enableCodeFolding\u003C/span>: \u003Cspan class=\"hljs-literal\">false\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">enableInlineColors\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">enableDiffHighlighting\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">autoDetectLanguage\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">tabSize\u003C/span>: \u003Cspan class=\"hljs-number\">4\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">maxHeight\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;500px&#x27;\u003C/span>,\n            ...options\n        };\n        \n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">loadedLanguages\u003C/span> = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">Set\u003C/span>();\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">languageAliases\u003C/span> = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">Map\u003C/span>([\n            [\u003Cspan class=\"hljs-string\">&#x27;js&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;javascript&#x27;\u003C/span>],\n            [\u003Cspan class=\"hljs-string\">&#x27;ts&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;typescript&#x27;\u003C/span>],\n            [\u003Cspan class=\"hljs-string\">&#x27;py&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;python&#x27;\u003C/span>],\n            [\u003Cspan class=\"hljs-string\">&#x27;sh&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;bash&#x27;\u003C/span>],\n            [\u003Cspan class=\"hljs-string\">&#x27;yml&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;yaml&#x27;\u003C/span>],\n            [\u003Cspan class=\"hljs-string\">&#x27;md&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;markdown&#x27;\u003C/span>]\n        ]);\n        \n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">init\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">init\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadPrismCore\u003C/span>();\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadTheme\u003C/span>();\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadLanguages\u003C/span>();\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadPlugins\u003C/span>();\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">setupCodeBlocks\u003C/span>();\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">bindEvents\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadPrismCore\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-title class_\">Prism\u003C/span> === \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span>) {\n            \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadScript\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js&#x27;\u003C/span>);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadTheme\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> themeUrl = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">getThemeUrl\u003C/span>(\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">theme\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadCSS\u003C/span>(themeUrl);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">getThemeUrl\u003C/span>(\u003Cspan class=\"hljs-params\">theme\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> themes = {\n            \u003Cspan class=\"hljs-string\">&#x27;default&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;dark&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-dark.min.css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;okaidia&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-okaidia.min.css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;tomorrow&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;twilight&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-twilight.min.css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;coy&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-coy.min.css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;funky&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-funky.min.css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;solarizedlight&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-solarizedlight.min.css&#x27;\u003C/span>\n        };\n        \n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> themes[theme] || themes[\u003Cspan class=\"hljs-string\">&#x27;default&#x27;\u003C/span>];\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadLanguages\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> baseUrl = \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/&#x27;\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">for\u003C/span> (\u003Cspan class=\"hljs-keyword\">const\u003C/span> language \u003Cspan class=\"hljs-keyword\">of\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> normalizedLang = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">languageAliases\u003C/span>.\u003Cspan class=\"hljs-title function_\">get\u003C/span>(language) || language;\n            \n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (!\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">loadedLanguages\u003C/span>.\u003Cspan class=\"hljs-title function_\">has\u003C/span>(normalizedLang) &amp;&amp; normalizedLang !== \u003Cspan class=\"hljs-string\">&#x27;markup&#x27;\u003C/span>) {\n                \u003Cspan class=\"hljs-keyword\">try\u003C/span> {\n                    \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadScript\u003C/span>(\u003Cspan class=\"hljs-string\">`\u003Cspan class=\"hljs-subst\">${baseUrl}\u003C/span>prism-\u003Cspan class=\"hljs-subst\">${normalizedLang}\u003C/span>.min.js`\u003C/span>);\n                    \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">loadedLanguages\u003C/span>.\u003Cspan class=\"hljs-title function_\">add\u003C/span>(normalizedLang);\n                } \u003Cspan class=\"hljs-keyword\">catch\u003C/span> (error) {\n                    \u003Cspan class=\"hljs-variable language_\">console\u003C/span>.\u003Cspan class=\"hljs-title function_\">warn\u003C/span>(\u003Cspan class=\"hljs-string\">`Failed to load language: \u003Cspan class=\"hljs-subst\">${normalizedLang}\u003C/span>`\u003C/span>, error);\n                }\n            }\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Load common dependencies\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadLanguageDependencies\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadLanguageDependencies\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> dependencies = {\n            \u003Cspan class=\"hljs-string\">&#x27;typescript&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;javascript&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;jsx&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;javascript&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;tsx&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;jsx&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;typescript&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;scss&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;less&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;stylus&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;php&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;markup&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;smarty&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;markup&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;django&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;markup&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;handlebars&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;markup&#x27;\u003C/span>],\n            \u003Cspan class=\"hljs-string\">&#x27;erb&#x27;\u003C/span>: [\u003Cspan class=\"hljs-string\">&#x27;ruby&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;markup&#x27;\u003C/span>]\n        };\n        \n        \u003Cspan class=\"hljs-keyword\">for\u003C/span> (\u003Cspan class=\"hljs-keyword\">const\u003C/span> [lang, deps] \u003Cspan class=\"hljs-keyword\">of\u003C/span> \u003Cspan class=\"hljs-title class_\">Object\u003C/span>.\u003Cspan class=\"hljs-title function_\">entries\u003C/span>(dependencies)) {\n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>.\u003Cspan class=\"hljs-title function_\">includes\u003C/span>(lang)) {\n                \u003Cspan class=\"hljs-keyword\">for\u003C/span> (\u003Cspan class=\"hljs-keyword\">const\u003C/span> dep \u003Cspan class=\"hljs-keyword\">of\u003C/span> deps) {\n                    \u003Cspan class=\"hljs-keyword\">if\u003C/span> (!\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">loadedLanguages\u003C/span>.\u003Cspan class=\"hljs-title function_\">has\u003C/span>(dep)) {\n                        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadLanguage\u003C/span>(dep);\n                    }\n                }\n            }\n        }\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadLanguage\u003C/span>(\u003Cspan class=\"hljs-params\">language\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">loadedLanguages\u003C/span>.\u003Cspan class=\"hljs-title function_\">has\u003C/span>(language)) \u003Cspan class=\"hljs-keyword\">return\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> baseUrl = \u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/&#x27;\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">try\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadScript\u003C/span>(\u003Cspan class=\"hljs-string\">`\u003Cspan class=\"hljs-subst\">${baseUrl}\u003C/span>prism-\u003Cspan class=\"hljs-subst\">${language}\u003C/span>.min.js`\u003C/span>);\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">loadedLanguages\u003C/span>.\u003Cspan class=\"hljs-title function_\">add\u003C/span>(language);\n        } \u003Cspan class=\"hljs-keyword\">catch\u003C/span> (error) {\n            \u003Cspan class=\"hljs-variable language_\">console\u003C/span>.\u003Cspan class=\"hljs-title function_\">warn\u003C/span>(\u003Cspan class=\"hljs-string\">`Failed to load language dependency: \u003Cspan class=\"hljs-subst\">${language}\u003C/span>`\u003C/span>, error);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadPlugins\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> plugins = [];\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableLineNumbers\u003C/span>) {\n            plugins.\u003Cspan class=\"hljs-title function_\">push\u003C/span>(\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadLineNumbers\u003C/span>());\n        }\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableCopyButton\u003C/span>) {\n            plugins.\u003Cspan class=\"hljs-title function_\">push\u003C/span>(\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadCopyButton\u003C/span>());\n        }\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableCodeFolding\u003C/span>) {\n            plugins.\u003Cspan class=\"hljs-title function_\">push\u003C/span>(\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadCodeFolding\u003C/span>());\n        }\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableDiffHighlighting\u003C/span>) {\n            plugins.\u003Cspan class=\"hljs-title function_\">push\u003C/span>(\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadDiffHighlighting\u003C/span>());\n        }\n        \n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-title class_\">Promise\u003C/span>.\u003Cspan class=\"hljs-title function_\">all\u003C/span>(plugins);\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadLineNumbers\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadScript\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.js&#x27;\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadCSS\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.css&#x27;\u003C/span>);\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadCopyButton\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadScript\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js&#x27;\u003C/span>);\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadCodeFolding\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-comment\">// Custom implementation for code folding\u003C/span>\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">setupCodeFolding\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadDiffHighlighting\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadScript\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/diff-highlight/prism-diff-highlight.min.js&#x27;\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">await\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadCSS\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/diff-highlight/prism-diff-highlight.min.css&#x27;\u003C/span>);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">setupCodeBlocks\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> codeBlocks = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">querySelectorAll\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre[class*=&quot;language-&quot;], code[class*=&quot;language-&quot;]&#x27;\u003C/span>);\n        \n        codeBlocks.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">block\u003C/span> =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">enhanceCodeBlock\u003C/span>(block);\n        });\n        \n        \u003Cspan class=\"hljs-comment\">// Auto-detect language for unmarked code blocks\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">autoDetectLanguage\u003C/span>) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">autoDetectLanguages\u003C/span>();\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">enhanceCodeBlock\u003C/span>(\u003Cspan class=\"hljs-params\">block\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> pre = block.\u003Cspan class=\"hljs-property\">tagName\u003C/span> === \u003Cspan class=\"hljs-string\">&#x27;PRE&#x27;\u003C/span> ? block : block.\u003Cspan class=\"hljs-title function_\">closest\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre&#x27;\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (!pre) \u003Cspan class=\"hljs-keyword\">return\u003C/span>;\n        \n        \u003Cspan class=\"hljs-comment\">// Add wrapper div for enhanced styling\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (!pre.\u003Cspan class=\"hljs-title function_\">closest\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;.code-block-wrapper&#x27;\u003C/span>)) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> wrapper = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;div&#x27;\u003C/span>);\n            wrapper.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;code-block-wrapper&#x27;\u003C/span>;\n            pre.\u003Cspan class=\"hljs-property\">parentNode\u003C/span>.\u003Cspan class=\"hljs-title function_\">insertBefore\u003C/span>(wrapper, pre);\n            wrapper.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(pre);\n            \n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">addLanguageLabel\u003C/span>(wrapper, pre);\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">addCodeToolbar\u003C/span>(wrapper, pre);\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">setupCodeInteractions\u003C/span>(wrapper, pre);\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Add line numbers if enabled\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableLineNumbers\u003C/span> &amp;&amp; !pre.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">contains\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;line-numbers&#x27;\u003C/span>)) {\n            pre.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">add\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;line-numbers&#x27;\u003C/span>);\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Set max height if specified\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">maxHeight\u003C/span>) {\n            pre.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">maxHeight\u003C/span> = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">maxHeight\u003C/span>;\n            pre.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">overflow\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;auto&#x27;\u003C/span>;\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Apply tab size\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">tabSize\u003C/span>) {\n            pre.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">tabSize\u003C/span> = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">tabSize\u003C/span>;\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">addLanguageLabel\u003C/span>(\u003Cspan class=\"hljs-params\">wrapper, pre\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (!\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableLanguageLabels\u003C/span>) \u003Cspan class=\"hljs-keyword\">return\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> className = pre.\u003Cspan class=\"hljs-property\">className\u003C/span>;\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> langMatch = className.\u003Cspan class=\"hljs-title function_\">match\u003C/span>(\u003Cspan class=\"hljs-regexp\">/language-([a-zA-Z0-9-]+)/\u003C/span>);\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (langMatch) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> language = langMatch[\u003Cspan class=\"hljs-number\">1\u003C/span>];\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> label = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;div&#x27;\u003C/span>);\n            label.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;language-label&#x27;\u003C/span>;\n            label.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">formatLanguageName\u003C/span>(language);\n            label.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-label&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">`Code language: \u003Cspan class=\"hljs-subst\">${language}\u003C/span>`\u003C/span>);\n            wrapper.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(label);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">formatLanguageName\u003C/span>(\u003Cspan class=\"hljs-params\">language\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> names = {\n            \u003Cspan class=\"hljs-string\">&#x27;js&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;JavaScript&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;ts&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;TypeScript&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;py&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Python&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;cpp&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;C++&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;cs&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;C#&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;rb&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Ruby&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;go&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Go&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;rs&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Rust&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;php&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;PHP&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;java&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Java&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;kt&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Kotlin&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;swift&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Swift&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;dart&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Dart&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;scala&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Scala&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;clj&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Clojure&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;hs&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Haskell&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;ml&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;ML&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;fs&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;F#&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;sh&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Shell&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;bash&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Bash&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;zsh&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Zsh&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;ps1&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;PowerShell&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;sql&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;SQL&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;html&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;HTML&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;xml&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;XML&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;CSS&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;scss&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;SCSS&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;sass&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Sass&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;less&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Less&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;stylus&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Stylus&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;json&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;JSON&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;yaml&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;YAML&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;toml&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;TOML&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;ini&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;INI&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;md&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Markdown&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;tex&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;LaTeX&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;dockerfile&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Dockerfile&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;nginx&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Nginx&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;apache&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;Apache&#x27;\u003C/span>\n        };\n        \n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> names[language] || language.\u003Cspan class=\"hljs-title function_\">toUpperCase\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">addCodeToolbar\u003C/span>(\u003Cspan class=\"hljs-params\">wrapper, pre\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> toolbar = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;div&#x27;\u003C/span>);\n        toolbar.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;code-toolbar&#x27;\u003C/span>;\n        \n        \u003Cspan class=\"hljs-comment\">// Copy button\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableCopyButton\u003C/span>) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> copyButton = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;button&#x27;\u003C/span>);\n            copyButton.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;copy-button&#x27;\u003C/span>;\n            copyButton.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Copy&#x27;\u003C/span>;\n            copyButton.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-label&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;Copy code to clipboard&#x27;\u003C/span>);\n            copyButton.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;click&#x27;\u003C/span>, \u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">copyCode\u003C/span>(pre, copyButton));\n            toolbar.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(copyButton);\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Expand/collapse button\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableCodeFolding\u003C/span>) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> foldButton = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;button&#x27;\u003C/span>);\n            foldButton.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;fold-button&#x27;\u003C/span>;\n            foldButton.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Collapse&#x27;\u003C/span>;\n            foldButton.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-label&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;Toggle code visibility&#x27;\u003C/span>);\n            foldButton.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;click&#x27;\u003C/span>, \u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">toggleCodeFold\u003C/span>(pre, foldButton));\n            toolbar.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(foldButton);\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Download button\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> downloadButton = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;button&#x27;\u003C/span>);\n        downloadButton.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;download-button&#x27;\u003C/span>;\n        downloadButton.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Download&#x27;\u003C/span>;\n        downloadButton.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-label&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;Download code as file&#x27;\u003C/span>);\n        downloadButton.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;click&#x27;\u003C/span>, \u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">downloadCode\u003C/span>(pre));\n        toolbar.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(downloadButton);\n        \n        wrapper.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(toolbar);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">setupCodeInteractions\u003C/span>(\u003Cspan class=\"hljs-params\">wrapper, pre\u003C/span>) {\n        \u003Cspan class=\"hljs-comment\">// Add focus management for keyboard navigation\u003C/span>\n        pre.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;tabindex&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;0&#x27;\u003C/span>);\n        pre.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;role&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;textbox&#x27;\u003C/span>);\n        pre.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-label&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;Code example&#x27;\u003C/span>);\n        pre.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-readonly&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;true&#x27;\u003C/span>);\n        \n        \u003Cspan class=\"hljs-comment\">// Add keyboard shortcuts\u003C/span>\n        pre.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;keydown&#x27;\u003C/span>, \u003Cspan class=\"hljs-function\">(\u003Cspan class=\"hljs-params\">e\u003C/span>) =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (e.\u003Cspan class=\"hljs-property\">ctrlKey\u003C/span> || e.\u003Cspan class=\"hljs-property\">metaKey\u003C/span>) {\n                \u003Cspan class=\"hljs-keyword\">switch\u003C/span> (e.\u003Cspan class=\"hljs-property\">key\u003C/span>) {\n                    \u003Cspan class=\"hljs-keyword\">case\u003C/span> \u003Cspan class=\"hljs-string\">&#x27;c&#x27;\u003C/span>:\n                        e.\u003Cspan class=\"hljs-title function_\">preventDefault\u003C/span>();\n                        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">copyCode\u003C/span>(pre);\n                        \u003Cspan class=\"hljs-keyword\">break\u003C/span>;\n                    \u003Cspan class=\"hljs-keyword\">case\u003C/span> \u003Cspan class=\"hljs-string\">&#x27;a&#x27;\u003C/span>:\n                        e.\u003Cspan class=\"hljs-title function_\">preventDefault\u003C/span>();\n                        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">selectAllCode\u003C/span>(pre);\n                        \u003Cspan class=\"hljs-keyword\">break\u003C/span>;\n                }\n            }\n        });\n        \n        \u003Cspan class=\"hljs-comment\">// Add double-click to select all\u003C/span>\n        pre.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;dblclick&#x27;\u003C/span>, \u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">selectAllCode\u003C/span>(pre);\n        });\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">copyCode\u003C/span>(\u003Cspan class=\"hljs-params\">pre, button = \u003Cspan class=\"hljs-literal\">null\u003C/span>\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> code = pre.\u003Cspan class=\"hljs-title function_\">querySelector\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;code&#x27;\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> text = code ? code.\u003Cspan class=\"hljs-property\">textContent\u003C/span> : pre.\u003Cspan class=\"hljs-property\">textContent\u003C/span>;\n        \n        navigator.\u003Cspan class=\"hljs-property\">clipboard\u003C/span>.\u003Cspan class=\"hljs-title function_\">writeText\u003C/span>(text).\u003Cspan class=\"hljs-title function_\">then\u003C/span>(\u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">showCopyFeedback\u003C/span>(button || pre);\n        }).\u003Cspan class=\"hljs-title function_\">catch\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">err\u003C/span> =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-variable language_\">console\u003C/span>.\u003Cspan class=\"hljs-title function_\">error\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;Failed to copy code:&#x27;\u003C/span>, err);\n            \u003Cspan class=\"hljs-comment\">// Fallback for older browsers\u003C/span>\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">fallbackCopy\u003C/span>(text);\n        });\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">showCopyFeedback\u003C/span>(\u003Cspan class=\"hljs-params\">element\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> originalText = element.\u003Cspan class=\"hljs-property\">textContent\u003C/span>;\n        element.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Copied!&#x27;\u003C/span>;\n        element.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">add\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;copied&#x27;\u003C/span>);\n        \n        \u003Cspan class=\"hljs-built_in\">setTimeout\u003C/span>(\u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n            element.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = originalText;\n            element.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">remove\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;copied&#x27;\u003C/span>);\n        }, \u003Cspan class=\"hljs-number\">2000\u003C/span>);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">fallbackCopy\u003C/span>(\u003Cspan class=\"hljs-params\">text\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> textArea = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;textarea&#x27;\u003C/span>);\n        textArea.\u003Cspan class=\"hljs-property\">value\u003C/span> = text;\n        textArea.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">position\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;fixed&#x27;\u003C/span>;\n        textArea.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">left\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;-999999px&#x27;\u003C/span>;\n        textArea.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">top\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;-999999px&#x27;\u003C/span>;\n        \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(textArea);\n        textArea.\u003Cspan class=\"hljs-title function_\">focus\u003C/span>();\n        textArea.\u003Cspan class=\"hljs-title function_\">select\u003C/span>();\n        \n        \u003Cspan class=\"hljs-keyword\">try\u003C/span> {\n            \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">execCommand\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;copy&#x27;\u003C/span>);\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">showGlobalCopyFeedback\u003C/span>();\n        } \u003Cspan class=\"hljs-keyword\">catch\u003C/span> (err) {\n            \u003Cspan class=\"hljs-variable language_\">console\u003C/span>.\u003Cspan class=\"hljs-title function_\">error\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;Fallback copy failed:&#x27;\u003C/span>, err);\n        }\n        \n        \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>.\u003Cspan class=\"hljs-title function_\">removeChild\u003C/span>(textArea);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">showGlobalCopyFeedback\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> feedback = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;div&#x27;\u003C/span>);\n        feedback.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;copy-feedback&#x27;\u003C/span>;\n        feedback.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Code copied to clipboard&#x27;\u003C/span>;\n        feedback.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-live&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;polite&#x27;\u003C/span>);\n        \n        \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(feedback);\n        \n        \u003Cspan class=\"hljs-built_in\">setTimeout\u003C/span>(\u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n            feedback.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">add\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;show&#x27;\u003C/span>);\n        }, \u003Cspan class=\"hljs-number\">10\u003C/span>);\n        \n        \u003Cspan class=\"hljs-built_in\">setTimeout\u003C/span>(\u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n            feedback.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">remove\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;show&#x27;\u003C/span>);\n            \u003Cspan class=\"hljs-built_in\">setTimeout\u003C/span>(\u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n                \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>.\u003Cspan class=\"hljs-title function_\">removeChild\u003C/span>(feedback);\n            }, \u003Cspan class=\"hljs-number\">300\u003C/span>);\n        }, \u003Cspan class=\"hljs-number\">2000\u003C/span>);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">selectAllCode\u003C/span>(\u003Cspan class=\"hljs-params\">pre\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> range = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createRange\u003C/span>();\n        range.\u003Cspan class=\"hljs-title function_\">selectNodeContents\u003C/span>(pre);\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> selection = \u003Cspan class=\"hljs-variable language_\">window\u003C/span>.\u003Cspan class=\"hljs-title function_\">getSelection\u003C/span>();\n        selection.\u003Cspan class=\"hljs-title function_\">removeAllRanges\u003C/span>();\n        selection.\u003Cspan class=\"hljs-title function_\">addRange\u003C/span>(range);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">toggleCodeFold\u003C/span>(\u003Cspan class=\"hljs-params\">pre, button\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> isFolded = pre.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">contains\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;folded&#x27;\u003C/span>);\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (isFolded) {\n            pre.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">remove\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;folded&#x27;\u003C/span>);\n            button.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Collapse&#x27;\u003C/span>;\n            button.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-expanded&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;true&#x27;\u003C/span>);\n        } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n            pre.\u003Cspan class=\"hljs-property\">classList\u003C/span>.\u003Cspan class=\"hljs-title function_\">add\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;folded&#x27;\u003C/span>);\n            button.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Expand&#x27;\u003C/span>;\n            button.\u003Cspan class=\"hljs-title function_\">setAttribute\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;aria-expanded&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;false&#x27;\u003C/span>);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">downloadCode\u003C/span>(\u003Cspan class=\"hljs-params\">pre\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> code = pre.\u003Cspan class=\"hljs-title function_\">querySelector\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;code&#x27;\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> text = code ? code.\u003Cspan class=\"hljs-property\">textContent\u003C/span> : pre.\u003Cspan class=\"hljs-property\">textContent\u003C/span>;\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> language = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">extractLanguage\u003C/span>(pre);\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> extension = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">getFileExtension\u003C/span>(language);\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> blob = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">Blob\u003C/span>([text], { \u003Cspan class=\"hljs-attr\">type\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;text/plain&#x27;\u003C/span> });\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> url = \u003Cspan class=\"hljs-variable constant_\">URL\u003C/span>.\u003Cspan class=\"hljs-title function_\">createObjectURL\u003C/span>(blob);\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> a = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;a&#x27;\u003C/span>);\n        a.\u003Cspan class=\"hljs-property\">href\u003C/span> = url;\n        a.\u003Cspan class=\"hljs-property\">download\u003C/span> = \u003Cspan class=\"hljs-string\">`code-example.\u003Cspan class=\"hljs-subst\">${extension}\u003C/span>`\u003C/span>;\n        \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(a);\n        a.\u003Cspan class=\"hljs-title function_\">click\u003C/span>();\n        \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>.\u003Cspan class=\"hljs-title function_\">removeChild\u003C/span>(a);\n        \n        \u003Cspan class=\"hljs-variable constant_\">URL\u003C/span>.\u003Cspan class=\"hljs-title function_\">revokeObjectURL\u003C/span>(url);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">extractLanguage\u003C/span>(\u003Cspan class=\"hljs-params\">pre\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> className = pre.\u003Cspan class=\"hljs-property\">className\u003C/span>;\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> match = className.\u003Cspan class=\"hljs-title function_\">match\u003C/span>(\u003Cspan class=\"hljs-regexp\">/language-([a-zA-Z0-9-]+)/\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> match ? match[\u003Cspan class=\"hljs-number\">1\u003C/span>] : \u003Cspan class=\"hljs-string\">&#x27;txt&#x27;\u003C/span>;\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">getFileExtension\u003C/span>(\u003Cspan class=\"hljs-params\">language\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> extensions = {\n            \u003Cspan class=\"hljs-string\">&#x27;javascript&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;js&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;typescript&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;ts&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;python&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;py&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;java&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;java&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;cpp&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;cpp&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;c&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;c&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;csharp&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;cs&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;ruby&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;rb&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;go&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;go&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;rust&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;rs&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;php&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;php&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;kotlin&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;kt&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;swift&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;swift&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;dart&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;dart&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;scala&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;scala&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;clojure&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;clj&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;haskell&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;hs&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;bash&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;sh&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;shell&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;sh&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;powershell&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;ps1&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;sql&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;sql&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;html&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;html&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;scss&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;scss&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;sass&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;sass&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;less&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;less&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;json&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;json&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;yaml&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;yaml&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;xml&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;xml&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;markdown&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;md&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;dockerfile&#x27;\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;dockerfile&#x27;\u003C/span>\n        };\n        \n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> extensions[language] || \u003Cspan class=\"hljs-string\">&#x27;txt&#x27;\u003C/span>;\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">autoDetectLanguages\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> untaggedBlocks = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">querySelectorAll\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre:not([class*=&quot;language-&quot;]) code, code:not([class*=&quot;language-&quot;])&#x27;\u003C/span>);\n        \n        untaggedBlocks.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">block\u003C/span> =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> text = block.\u003Cspan class=\"hljs-property\">textContent\u003C/span>;\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> detectedLanguage = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">detectLanguage\u003C/span>(text);\n            \n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (detectedLanguage) {\n                block.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">`language-\u003Cspan class=\"hljs-subst\">${detectedLanguage}\u003C/span>`\u003C/span>;\n                \u003Cspan class=\"hljs-keyword\">if\u003C/span> (block.\u003Cspan class=\"hljs-title function_\">closest\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre&#x27;\u003C/span>)) {\n                    block.\u003Cspan class=\"hljs-title function_\">closest\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre&#x27;\u003C/span>).\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">`language-\u003Cspan class=\"hljs-subst\">${detectedLanguage}\u003C/span>`\u003C/span>;\n                }\n            }\n        });\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">detectLanguage\u003C/span>(\u003Cspan class=\"hljs-params\">code\u003C/span>) {\n        \u003Cspan class=\"hljs-comment\">// Simple heuristic-based language detection\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> patterns = {\n            \u003Cspan class=\"hljs-string\">&#x27;javascript&#x27;\u003C/span>: [\n                \u003Cspan class=\"hljs-regexp\">/\\b(function|const|let|var|=&gt;|async|await|require|import)\\b/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\bconsole\\.log\\b/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\b(document|window)\\./\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\$\\(/\u003C/span>\n            ],\n            \u003Cspan class=\"hljs-string\">&#x27;python&#x27;\u003C/span>: [\n                \u003Cspan class=\"hljs-regexp\">/\\b(def|class|import|from|if __name__|print|range|len)\\b/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/:\\s*$/m\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\bindent/\u003C/span>\n            ],\n            \u003Cspan class=\"hljs-string\">&#x27;java&#x27;\u003C/span>: [\n                \u003Cspan class=\"hljs-regexp\">/\\b(public|private|protected|static|void|class|interface)\\b/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\bSystem\\.out\\.print/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\bpublic static void main\\b/\u003C/span>\n            ],\n            \u003Cspan class=\"hljs-string\">&#x27;html&#x27;\u003C/span>: [\n                \u003Cspan class=\"hljs-regexp\">/&lt;\\/?[a-zA-Z][^&gt;]*&gt;/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/&lt;!DOCTYPE/i\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/&lt;html|&lt;head|&lt;body/i\u003C/span>\n            ],\n            \u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>: [\n                \u003Cspan class=\"hljs-regexp\">/\\{[^}]*\\}/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/[a-zA-Z-]+\\s*:\\s*[^;]+;/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/@media|@import|@keyframes/\u003C/span>\n            ],\n            \u003Cspan class=\"hljs-string\">&#x27;sql&#x27;\u003C/span>: [\n                \u003Cspan class=\"hljs-regexp\">/\\b(SELECT|FROM|WHERE|JOIN|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP)\\b/i\u003C/span>\n            ],\n            \u003Cspan class=\"hljs-string\">&#x27;bash&#x27;\u003C/span>: [\n                \u003Cspan class=\"hljs-regexp\">/^#!/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\$[A-Za-z_][A-Za-z0-9_]*/\u003C/span>,\n                \u003Cspan class=\"hljs-regexp\">/\\becho|grep|awk|sed|ls|cd|mkdir\\b/\u003C/span>\n            ]\n        };\n        \n        \u003Cspan class=\"hljs-keyword\">for\u003C/span> (\u003Cspan class=\"hljs-keyword\">const\u003C/span> [language, regexes] \u003Cspan class=\"hljs-keyword\">of\u003C/span> \u003Cspan class=\"hljs-title class_\">Object\u003C/span>.\u003Cspan class=\"hljs-title function_\">entries\u003C/span>(patterns)) {\n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (regexes.\u003Cspan class=\"hljs-title function_\">some\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">regex\u003C/span> =&gt;\u003C/span> regex.\u003Cspan class=\"hljs-title function_\">test\u003C/span>(code))) {\n                \u003Cspan class=\"hljs-keyword\">return\u003C/span> language;\n            }\n        }\n        \n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> \u003Cspan class=\"hljs-literal\">null\u003C/span>;\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadScript\u003C/span>(\u003Cspan class=\"hljs-params\">src\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">Promise\u003C/span>(\u003Cspan class=\"hljs-function\">(\u003Cspan class=\"hljs-params\">resolve, reject\u003C/span>) =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> script = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;script&#x27;\u003C/span>);\n            script.\u003Cspan class=\"hljs-property\">src\u003C/span> = src;\n            script.\u003Cspan class=\"hljs-property\">onload\u003C/span> = resolve;\n            script.\u003Cspan class=\"hljs-property\">onerror\u003C/span> = reject;\n            \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">head\u003C/span>.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(script);\n        });\n    }\n    \n    \u003Cspan class=\"hljs-keyword\">async\u003C/span> \u003Cspan class=\"hljs-title function_\">loadCSS\u003C/span>(\u003Cspan class=\"hljs-params\">href\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">Promise\u003C/span>(\u003Cspan class=\"hljs-function\">(\u003Cspan class=\"hljs-params\">resolve, reject\u003C/span>) =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> link = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;link&#x27;\u003C/span>);\n            link.\u003Cspan class=\"hljs-property\">rel\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;stylesheet&#x27;\u003C/span>;\n            link.\u003Cspan class=\"hljs-property\">href\u003C/span> = href;\n            link.\u003Cspan class=\"hljs-property\">onload\u003C/span> = resolve;\n            link.\u003Cspan class=\"hljs-property\">onerror\u003C/span> = reject;\n            \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">head\u003C/span>.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(link);\n        });\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">bindEvents\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-comment\">// Handle dynamically added code blocks\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> observer = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">MutationObserver\u003C/span>(\u003Cspan class=\"hljs-function\">(\u003Cspan class=\"hljs-params\">mutations\u003C/span>) =&gt;\u003C/span> {\n            mutations.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">mutation\u003C/span> =&gt;\u003C/span> {\n                mutation.\u003Cspan class=\"hljs-property\">addedNodes\u003C/span>.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">node\u003C/span> =&gt;\u003C/span> {\n                    \u003Cspan class=\"hljs-keyword\">if\u003C/span> (node.\u003Cspan class=\"hljs-property\">nodeType\u003C/span> === \u003Cspan class=\"hljs-number\">1\u003C/span>) {\n                        \u003Cspan class=\"hljs-keyword\">const\u003C/span> codeBlocks = node.\u003Cspan class=\"hljs-title function_\">querySelectorAll\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre[class*=&quot;language-&quot;], code[class*=&quot;language-&quot;]&#x27;\u003C/span>);\n                        codeBlocks.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">block\u003C/span> =&gt;\u003C/span> {\n                            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">enhanceCodeBlock\u003C/span>(block);\n                        });\n                        \n                        \u003Cspan class=\"hljs-comment\">// Re-run Prism highlighting\u003C/span>\n                        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-title class_\">Prism\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span> &amp;&amp; \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">highlightAllUnder\u003C/span>) {\n                            \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightAllUnder\u003C/span>(node);\n                        }\n                    }\n                });\n            });\n        });\n        \n        observer.\u003Cspan class=\"hljs-title function_\">observe\u003C/span>(\u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>, {\n            \u003Cspan class=\"hljs-attr\">childList\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">subtree\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>\n        });\n    }\n    \n    \u003Cspan class=\"hljs-comment\">// Public API\u003C/span>\n    \u003Cspan class=\"hljs-title function_\">highlightElement\u003C/span>(\u003Cspan class=\"hljs-params\">element\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-title class_\">Prism\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span>) {\n            \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightElement\u003C/span>(element);\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">enhanceCodeBlock\u003C/span>(element);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">addLanguage\u003C/span>(\u003Cspan class=\"hljs-params\">name, grammar\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-title class_\">Prism\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span>) {\n            \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>[name] = grammar;\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">loadedLanguages\u003C/span>.\u003Cspan class=\"hljs-title function_\">add\u003C/span>(name);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">setTheme\u003C/span>(\u003Cspan class=\"hljs-params\">theme\u003C/span>) {\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">theme\u003C/span> = theme;\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">loadTheme\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">updateOptions\u003C/span>(\u003Cspan class=\"hljs-params\">newOptions\u003C/span>) {\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span> = { ...\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>, ...newOptions };\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">setupCodeBlocks\u003C/span>();\n    }\n}\n\n\u003Cspan class=\"hljs-comment\">// Enhanced CSS for advanced syntax highlighting\u003C/span>\n\u003Cspan class=\"hljs-keyword\">const\u003C/span> advancedSyntaxStyles = \u003Cspan class=\"hljs-string\">`\n/* Code block wrapper styling */\n.code-block-wrapper {\n    position: relative;\n    margin: 1.5rem 0;\n    border-radius: 8px;\n    background: #f8f9fa;\n    border: 1px solid #e9ecef;\n    overflow: hidden;\n    box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\n/* Language label */\n.language-label {\n    position: absolute;\n    top: 8px;\n    right: 8px;\n    background: rgba(0,0,0,0.7);\n    color: white;\n    padding: 4px 8px;\n    border-radius: 4px;\n    font-size: 12px;\n    font-weight: 500;\n    z-index: 10;\n    pointer-events: none;\n}\n\n/* Code toolbar */\n.code-toolbar {\n    position: absolute;\n    top: 8px;\n    right: 8px;\n    display: flex;\n    gap: 4px;\n    opacity: 0;\n    transition: opacity 0.2s ease;\n    z-index: 10;\n}\n\n.code-block-wrapper:hover .code-toolbar {\n    opacity: 1;\n}\n\n.code-toolbar button {\n    background: rgba(0,0,0,0.7);\n    color: white;\n    border: none;\n    padding: 6px 10px;\n    border-radius: 4px;\n    font-size: 12px;\n    cursor: pointer;\n    transition: background-color 0.2s ease;\n}\n\n.code-toolbar button:hover {\n    background: rgba(0,0,0,0.9);\n}\n\n.code-toolbar button:focus {\n    outline: 2px solid #007bff;\n    outline-offset: 2px;\n}\n\n.code-toolbar button.copied {\n    background: #28a745;\n}\n\n/* Enhanced pre styling */\n.code-block-wrapper pre {\n    margin: 0;\n    padding: 16px;\n    background: inherit;\n    border-radius: 0;\n    font-size: 14px;\n    line-height: 1.5;\n    font-family: &#x27;Fira Code&#x27;, &#x27;Consolas&#x27;, &#x27;Monaco&#x27;, &#x27;Courier New&#x27;, monospace;\n    overflow-x: auto;\n    tab-size: 4;\n}\n\n.code-block-wrapper pre:focus {\n    outline: 2px solid #007bff;\n    outline-offset: -2px;\n}\n\n/* Code folding */\n.code-block-wrapper pre.folded {\n    max-height: 100px;\n    overflow: hidden;\n    position: relative;\n}\n\n.code-block-wrapper pre.folded::after {\n    content: &#x27;&#x27;;\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    right: 0;\n    height: 40px;\n    background: linear-gradient(transparent, #f8f9fa);\n    pointer-events: none;\n}\n\n/* Line numbers enhancement */\n.line-numbers-rows {\n    padding-left: 0 !important;\n    border-right: 1px solid #e9ecef;\n    margin-right: 16px;\n    padding-right: 8px;\n}\n\n.line-numbers-rows &gt; span:before {\n    color: #6c757d;\n    font-weight: normal;\n}\n\n/* Copy feedback */\n.copy-feedback {\n    position: fixed;\n    top: 20px;\n    right: 20px;\n    background: #28a745;\n    color: white;\n    padding: 12px 20px;\n    border-radius: 6px;\n    font-size: 14px;\n    font-weight: 500;\n    box-shadow: 0 4px 12px rgba(0,0,0,0.2);\n    transform: translateX(100%);\n    opacity: 0;\n    transition: all 0.3s ease;\n    z-index: 9999;\n}\n\n.copy-feedback.show {\n    transform: translateX(0);\n    opacity: 1;\n}\n\n/* Dark theme support */\n@media (prefers-color-scheme: dark) {\n    .code-block-wrapper {\n        background: #1e1e1e;\n        border-color: #404040;\n    }\n    \n    .line-numbers-rows {\n        border-right-color: #404040;\n    }\n    \n    .line-numbers-rows &gt; span:before {\n        color: #888;\n    }\n}\n\n/* High contrast mode */\n@media (prefers-contrast: high) {\n    .code-block-wrapper {\n        border: 2px solid #000;\n        background: #fff;\n    }\n    \n    .code-toolbar button {\n        background: #000;\n        color: #fff;\n        border: 1px solid #fff;\n    }\n    \n    .language-label {\n        background: #000;\n        color: #fff;\n        border: 1px solid #fff;\n    }\n}\n\n/* Reduced motion preferences */\n@media (prefers-reduced-motion: reduce) {\n    .code-toolbar,\n    .copy-feedback,\n    .code-toolbar button {\n        transition: none;\n    }\n}\n\n/* Mobile optimizations */\n@media (max-width: 768px) {\n    .code-block-wrapper pre {\n        padding: 12px;\n        font-size: 13px;\n    }\n    \n    .code-toolbar {\n        opacity: 1; /* Always show on mobile */\n        position: static;\n        background: rgba(0,0,0,0.05);\n        padding: 8px;\n        border-bottom: 1px solid #e9ecef;\n        justify-content: flex-end;\n    }\n    \n    .language-label {\n        position: static;\n        background: rgba(0,0,0,0.05);\n        color: inherit;\n        padding: 8px 12px;\n        border-bottom: 1px solid #e9ecef;\n        border-radius: 0;\n    }\n}\n\n/* Print styles */\n@media print {\n    .code-toolbar,\n    .language-label {\n        display: none;\n    }\n    \n    .code-block-wrapper {\n        break-inside: avoid;\n        box-shadow: none;\n        border: 1px solid #000;\n    }\n    \n    .code-block-wrapper pre {\n        white-space: pre-wrap;\n        word-wrap: break-word;\n    }\n}\n\n/* Accessibility improvements */\n.code-block-wrapper pre[aria-label]:focus::before {\n    content: attr(aria-label);\n    position: absolute;\n    top: -30px;\n    left: 0;\n    background: #000;\n    color: #fff;\n    padding: 4px 8px;\n    border-radius: 4px;\n    font-size: 12px;\n    z-index: 1000;\n}\n\n/* Language-specific enhancements */\n.language-diff .token.inserted {\n    background: rgba(40, 167, 69, 0.2);\n    color: #155724;\n}\n\n.language-diff .token.deleted {\n    background: rgba(220, 53, 69, 0.2);\n    color: #721c24;\n}\n\n.token.comment {\n    font-style: italic;\n}\n\n.token.string,\n.token.attr-value {\n    quotes: &#x27;&quot;&#x27; &#x27;&quot;&#x27;;\n}\n\n.token.url {\n    text-decoration: underline;\n}\n\n/* Custom tokens for enhanced highlighting */\n.token.this,\n.token.super {\n    color: #e83e8c;\n}\n\n.token.console {\n    color: #6f42c1;\n}\n\n.token.dom {\n    color: #fd7e14;\n}\n\n.token.filesystem {\n    color: #20c997;\n}\n`\u003C/span>;\n\n\u003Cspan class=\"hljs-comment\">// Inject enhanced styles\u003C/span>\n\u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-variable language_\">document\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span>) {\n    \u003Cspan class=\"hljs-keyword\">const\u003C/span> style = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;style&#x27;\u003C/span>);\n    style.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = advancedSyntaxStyles;\n    \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">head\u003C/span>.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(style);\n}\n\n\u003Cspan class=\"hljs-comment\">// Initialize advanced syntax highlighting\u003C/span>\n\u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;DOMContentLoaded&#x27;\u003C/span>, \u003Cspan class=\"hljs-keyword\">function\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n    \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">AdvancedPrismHighlighter\u003C/span>({\n        \u003Cspan class=\"hljs-attr\">theme\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;default&#x27;\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">languages\u003C/span>: [\n            \u003Cspan class=\"hljs-string\">&#x27;javascript&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;typescript&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;python&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;java&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;cpp&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;c&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;csharp&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;ruby&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;go&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;rust&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;php&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;kotlin&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;swift&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;dart&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;scala&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;bash&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;powershell&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;sql&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;html&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;css&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;scss&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;json&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;yaml&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-string\">&#x27;markdown&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;dockerfile&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;nginx&#x27;\u003C/span>, \u003Cspan class=\"hljs-string\">&#x27;apache&#x27;\u003C/span>\n        ],\n        \u003Cspan class=\"hljs-attr\">enableLineNumbers\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">enableCopyButton\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">enableLanguageLabels\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">enableCodeFolding\u003C/span>: \u003Cspan class=\"hljs-literal\">false\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">autoDetectLanguage\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">maxHeight\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;600px&#x27;\u003C/span>\n    });\n});\n\n\u003Cspan class=\"hljs-comment\">// Export for module systems\u003C/span>\n\u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-variable language_\">module\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span> &amp;&amp; \u003Cspan class=\"hljs-variable language_\">module\u003C/span>.\u003Cspan class=\"hljs-property\">exports\u003C/span>) {\n    \u003Cspan class=\"hljs-variable language_\">module\u003C/span>.\u003Cspan class=\"hljs-property\">exports\u003C/span> = \u003Cspan class=\"hljs-title class_\">AdvancedPrismHighlighter\u003C/span>;\n}\n\n\u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> define === \u003Cspan class=\"hljs-string\">&#x27;function&#x27;\u003C/span> &amp;&amp; define.\u003Cspan class=\"hljs-property\">amd\u003C/span>) {\n    \u003Cspan class=\"hljs-title function_\">define\u003C/span>([], \u003Cspan class=\"hljs-keyword\">function\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> \u003Cspan class=\"hljs-title class_\">AdvancedPrismHighlighter\u003C/span>;\n    });\n}\n\u003C/code>\u003C/pre>\u003Ch3 id=\"custom-theme-development\">Custom Theme Development\u003C/h3>\n\u003Cp>Creating brand-consistent syntax highlighting themes:\u003C/p>\n\u003Cpre>\u003Ccode class=\"hljs language-markdown\">\u003Cspan class=\"hljs-section\"># Custom Theme Creation System\u003C/span>\n\n\u003Cspan class=\"hljs-section\">## CSS-in-JS Theme Builder\u003C/span>\n\u003Cspan class=\"hljs-code\">```javascript\n// theme-builder.js - Dynamic theme generation system\nclass SyntaxThemeBuilder {\n    constructor() {\n        this.themes = new Map();\n        this.customProperties = new Map();\n        this.activeTheme = null;\n        \n        this.initializeDefaultThemes();\n    }\n    \n    initializeDefaultThemes() {\n        // GitHub-inspired theme\n        this.addTheme(&#x27;github&#x27;, {\n            name: &#x27;GitHub&#x27;,\n            colors: {\n                background: &#x27;#ffffff&#x27;,\n                foreground: &#x27;#24292e&#x27;,\n                selection: &#x27;#c8e1ff&#x27;,\n                comment: &#x27;#6a737d&#x27;,\n                keyword: &#x27;#d73a49&#x27;,\n                string: &#x27;#032f62&#x27;,\n                number: &#x27;#005cc5&#x27;,\n                operator: &#x27;#24292e&#x27;,\n                function: &#x27;#6f42c1&#x27;,\n                variable: &#x27;#e36209&#x27;,\n                type: &#x27;#005cc5&#x27;,\n                tag: &#x27;#22863a&#x27;,\n                attribute: &#x27;#6f42c1&#x27;,\n                punctuation: &#x27;#24292e&#x27;,\n                lineNumbers: &#x27;#959da5&#x27;,\n                lineHighlight: &#x27;#f6f8fa&#x27;,\n                border: &#x27;#e1e4e8&#x27;,\n                scrollbar: &#x27;#d1d5da&#x27;\n            },\n            fonts: {\n                code: &quot;&#x27;SFMono-Regular&#x27;, &#x27;Consolas&#x27;, &#x27;Liberation Mono&#x27;, &#x27;Menlo&#x27;, &#x27;Courier&#x27;, monospace&quot;\n            },\n            sizes: {\n                fontSize: &#x27;14px&#x27;,\n                lineHeight: &#x27;1.45&#x27;\n            }\n        });\n        \n        // VS Code Dark+ theme\n        this.addTheme(&#x27;vscode-dark&#x27;, {\n            name: &#x27;VS Code Dark+&#x27;,\n            colors: {\n                background: &#x27;#1e1e1e&#x27;,\n                foreground: &#x27;#d4d4d4&#x27;,\n                selection: &#x27;#264f78&#x27;,\n                comment: &#x27;#6a9955&#x27;,\n                keyword: &#x27;#569cd6&#x27;,\n                string: &#x27;#ce9178&#x27;,\n                number: &#x27;#b5cea8&#x27;,\n                operator: &#x27;#d4d4d4&#x27;,\n                function: &#x27;#dcdcaa&#x27;,\n                variable: &#x27;#9cdcfe&#x27;,\n                type: &#x27;#4ec9b0&#x27;,\n                tag: &#x27;#569cd6&#x27;,\n                attribute: &#x27;#92c5f8&#x27;,\n                punctuation: &#x27;#d4d4d4&#x27;,\n                lineNumbers: &#x27;#858585&#x27;,\n                lineHighlight: &#x27;#2a2d2e&#x27;,\n                border: &#x27;#3c3c3c&#x27;,\n                scrollbar: &#x27;#424242&#x27;\n            },\n            fonts: {\n                code: &quot;&#x27;Fira Code&#x27;, &#x27;Cascadia Code&#x27;, &#x27;JetBrains Mono&#x27;, &#x27;Consolas&#x27;, monospace&quot;\n            },\n            sizes: {\n                fontSize: &#x27;14px&#x27;,\n                lineHeight: &#x27;1.4&#x27;\n            }\n        });\n        \n        // Material Design theme\n        this.addTheme(&#x27;material&#x27;, {\n            name: &#x27;Material Design&#x27;,\n            colors: {\n                background: &#x27;#263238&#x27;,\n                foreground: &#x27;#eeffff&#x27;,\n                selection: &#x27;#546e7a&#x27;,\n                comment: &#x27;#546e7a&#x27;,\n                keyword: &#x27;#c792ea&#x27;,\n                string: &#x27;#c3e88d&#x27;,\n                number: &#x27;#f78c6c&#x27;,\n                operator: &#x27;#89ddff&#x27;,\n                function: &#x27;#82aaff&#x27;,\n                variable: &#x27;#eeffff&#x27;,\n                type: &#x27;#ffcb6b&#x27;,\n                tag: &#x27;#f07178&#x27;,\n                attribute: &#x27;#c792ea&#x27;,\n                punctuation: &#x27;#89ddff&#x27;,\n                lineNumbers: &#x27;#546e7a&#x27;,\n                lineHighlight: &#x27;#314549&#x27;,\n                border: &#x27;#37474f&#x27;,\n                scrollbar: &#x27;#37474f&#x27;\n            },\n            fonts: {\n                code: &quot;&#x27;Operator Mono&#x27;, &#x27;Fira Code&#x27;, &#x27;SF Mono&#x27;, monospace&quot;\n            },\n            sizes: {\n                fontSize: &#x27;14px&#x27;,\n                lineHeight: &#x27;1.5&#x27;\n            }\n        });\n    }\n    \n    addTheme(id, themeConfig) {\n        this.themes.set(id, themeConfig);\n    }\n    \n    generateThemeCSS(themeId) {\n        const theme = this.themes.get(themeId);\n        if (!theme) {\n            throw new Error(`Theme &#x27;${themeId}&#x27; not found`);\n        }\n        \n        const { colors, fonts, sizes } = theme;\n        \n        return `\n/* ${theme.name} Theme */\n.theme-${themeId} {\n    --syntax-bg: ${colors.background};\n    --syntax-fg: ${colors.foreground};\n    --syntax-selection: ${colors.selection};\n    --syntax-comment: ${colors.comment};\n    --syntax-keyword: ${colors.keyword};\n    --syntax-string: ${colors.string};\n    --syntax-number: ${colors.number};\n    --syntax-operator: ${colors.operator};\n    --syntax-function: ${colors.function};\n    --syntax-variable: ${colors.variable};\n    --syntax-type: ${colors.type};\n    --syntax-tag: ${colors.tag};\n    --syntax-attribute: ${colors.attribute};\n    --syntax-punctuation: ${colors.punctuation};\n    --syntax-line-numbers: ${colors.lineNumbers};\n    --syntax-line-highlight: ${colors.lineHighlight};\n    --syntax-border: ${colors.border};\n    --syntax-scrollbar: ${colors.scrollbar};\n    --syntax-font: ${fonts.code};\n    --syntax-font-size: ${sizes.fontSize};\n    --syntax-line-height: ${sizes.lineHeight};\n}\n\n.theme-${themeId} pre[class*=&quot;language-&quot;] {\n    background: var(--syntax-bg);\n    color: var(--syntax-fg);\n    font-family: var(--syntax-font);\n    font-size: var(--syntax-font-size);\n    line-height: var(--syntax-line-height);\n    border: 1px solid var(--syntax-border);\n}\n\n.theme-${themeId} code[class*=&quot;language-&quot;] {\n    background: var(--syntax-bg);\n    color: var(--syntax-fg);\n    font-family: var(--syntax-font);\n}\n\n.theme-${themeId} .token.comment,\n.theme-${themeId} .token.prolog,\n.theme-${themeId} .token.doctype,\n.theme-${themeId} .token.cdata {\n    color: var(--syntax-comment);\n}\n\n.theme-${themeId} .token.punctuation {\n    color: var(--syntax-punctuation);\n}\n\n.theme-${themeId} .token.property,\n.theme-${themeId} .token.tag,\n.theme-${themeId} .token.boolean,\n.theme-${themeId} .token.constant,\n.theme-${themeId} .token.symbol,\n.theme-${themeId} .token.deleted {\n    color: var(--syntax-tag);\n}\n\n.theme-${themeId} .token.number {\n    color: var(--syntax-number);\n}\n\n.theme-${themeId} .token.selector,\n.theme-${themeId} .token.attr-name,\n.theme-${themeId} .token.string,\n.theme-${themeId} .token.char,\n.theme-${themeId} .token.builtin,\n.theme-${themeId} .token.inserted {\n    color: var(--syntax-string);\n}\n\n.theme-${themeId} .token.operator,\n.theme-${themeId} .token.entity,\n.theme-${themeId} .token.url,\n.theme-${themeId} .language-css .token.string,\n.theme-${themeId} .style .token.string {\n    color: var(--syntax-operator);\n}\n\n.theme-${themeId} .token.atrule,\n.theme-${themeId} .token.attr-value,\n.theme-${themeId} .token.keyword {\n    color: var(--syntax-keyword);\n}\n\n.theme-${themeId} .token.function,\n.theme-${themeId} .token.class-name {\n    color: var(--syntax-function);\n}\n\n.theme-${themeId} .token.regex,\n.theme-${themeId} .token.important,\n.theme-${themeId} .token.variable {\n    color: var(--syntax-variable);\n}\n\n.theme-${themeId} .token.namespace {\n    color: var(--syntax-type);\n}\n\n.theme-${themeId} .line-numbers .line-numbers-rows {\n    border-right-color: var(--syntax-border);\n}\n\n.theme-${themeId} .line-numbers-rows &gt; span:before {\n    color: var(--syntax-line-numbers);\n}\n\n.theme-${themeId} .line-highlight {\n    background: var(--syntax-line-highlight);\n}\n\n.theme-${themeId} pre[class*=&quot;language-&quot;]::-webkit-scrollbar {\n    width: 12px;\n    height: 12px;\n}\n\n.theme-${themeId} pre[class*=&quot;language-&quot;]::-webkit-scrollbar-track {\n    background: var(--syntax-bg);\n}\n\n.theme-${themeId} pre[class*=&quot;language-&quot;]::-webkit-scrollbar-thumb {\n    background: var(--syntax-scrollbar);\n    border-radius: 6px;\n}\n\n.theme-${themeId} pre[class*=&quot;language-&quot;]::-webkit-scrollbar-thumb:hover {\n    background: color-mix(in srgb, var(--syntax-scrollbar), white 20%);\n}\n\n.theme-${themeId} ::selection {\n    background: var(--syntax-selection);\n}\n`;\n    }\n    \n    applyTheme(themeId) {\n        // Remove existing theme stylesheets\n        const existingThemes = document.querySelectorAll(&#x27;style[data-syntax-theme]&#x27;);\n        existingThemes.forEach(style =&gt; style.remove());\n        \n        // Apply new theme\n        const css = this.generateThemeCSS(themeId);\n        const style = document.createElement(&#x27;style&#x27;);\n        style.setAttribute(&#x27;data-syntax-theme&#x27;, themeId);\n        style.textContent = css;\n        document.head.appendChild(style);\n        \n        // Update body class\n        document.body.classList.remove(...Array.from(document.body.classList).filter(cls =&gt; cls.startsWith(&#x27;theme-&#x27;)));\n        document.body.classList.add(`theme-${themeId}`);\n        \n        this.activeTheme = themeId;\n        \n        // Store preference\n        localStorage.setItem(&#x27;preferred-syntax-theme&#x27;, themeId);\n        \n        // Emit theme change event\n        document.dispatchEvent(new CustomEvent(&#x27;syntaxThemeChanged&#x27;, {\n            detail: { themeId, theme: this.themes.get(themeId) }\n        }));\n    }\n    \n    createCustomTheme(id, baseThemeId, overrides = {}) {\n        const baseTheme = this.themes.get(baseThemeId);\n        if (!baseTheme) {\n            throw new Error(`Base theme &#x27;${baseThemeId}&#x27; not found`);\n        }\n        \n        const customTheme = {\n            name: overrides.name || `Custom ${baseTheme.name}`,\n            colors: { ...baseTheme.colors, ...overrides.colors },\n            fonts: { ...baseTheme.fonts, ...overrides.fonts },\n            sizes: { ...baseTheme.sizes, ...overrides.sizes }\n        };\n        \n        this.addTheme(id, customTheme);\n        return id;\n    }\n    \n    getAvailableThemes() {\n        return Array.from(this.themes.entries()).map(([id, theme]) =&gt; ({\n            id,\n            name: theme.name\n        }));\n    }\n    \n    exportTheme(themeId) {\n        const theme = this.themes.get(themeId);\n        if (!theme) {\n            throw new Error(`Theme &#x27;${themeId}&#x27; not found`);\n        }\n        \n        return {\n            id: themeId,\n            ...theme\n        };\n    }\n    \n    importTheme(themeData) {\n        const { id, ...theme } = themeData;\n        this.addTheme(id, theme);\n        return id;\n    }\n    \n    // Color utility methods\n    lighten(color, amount) {\n        const num = parseInt(color.replace(&quot;#&quot;, &quot;&quot;), 16);\n        const amt = Math.round(2.55 * amount);\n        const R = (num &gt;&gt; 16) + amt;\n        const G = (num &gt;&gt; 8 &amp; 0x00FF) + amt;\n        const B = (num &amp; 0x0000FF) + amt;\n        \n        return &quot;#&quot; + (0x1000000 + (R &lt; 255 ? R &lt; 1 ? 0 : R : 255) * 0x10000 +\n            (G &lt; 255 ? G &lt; 1 ? 0 : G : 255) * 0x100 +\n            (B &lt; 255 ? B &lt; 1 ? 0 : B : 255)).toString(16).slice(1);\n    }\n    \n    darken(color, amount) {\n        return this.lighten(color, -amount);\n    }\n    \n    hexToRgb(hex) {\n        const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n        return result ? {\n            r: parseInt(result[1], 16),\n            g: parseInt(result[2], 16),\n            b: parseInt(result[3], 16)\n        } : null;\n    }\n    \n    rgbToHex(r, g, b) {\n        return &quot;#&quot; + ((1 &lt;&lt; 24) + (r &lt;&lt; 16) + (g &lt;&lt; 8) + b).toString(16).slice(1);\n    }\n}\n\n// Theme selector component\nclass ThemeSelector {\n    constructor(themeBuilder, containerId) {\n        this.themeBuilder = themeBuilder;\n        this.container = document.getElementById(containerId);\n        \n        if (this.container) {\n            this.createSelector();\n            this.loadSavedTheme();\n        }\n    }\n    \n    createSelector() {\n        const selector = document.createElement(&#x27;select&#x27;);\n        selector.id = &#x27;syntax-theme-selector&#x27;;\n        selector.className = &#x27;theme-selector&#x27;;\n        selector.setAttribute(&#x27;aria-label&#x27;, &#x27;Select syntax highlighting theme&#x27;);\n        \n        const label = document.createElement(&#x27;label&#x27;);\n        label.htmlFor = &#x27;syntax-theme-selector&#x27;;\n        label.textContent = &#x27;Syntax Theme: &#x27;;\n        label.className = &#x27;theme-selector-label&#x27;;\n        \n        const themes = this.themeBuilder.getAvailableThemes();\n        themes.forEach(theme =&gt; {\n            const option = document.createElement(&#x27;option&#x27;);\n            option.value = theme.id;\n            option.textContent = theme.name;\n            selector.appendChild(option);\n        });\n        \n        selector.addEventListener(&#x27;change&#x27;, (e) =&gt; {\n            this.themeBuilder.applyTheme(e.target.value);\n        });\n        \n        this.container.appendChild(label);\n        this.container.appendChild(selector);\n        this.selector = selector;\n    }\n    \n    loadSavedTheme() {\n        const savedTheme = localStorage.getItem(&#x27;preferred-syntax-theme&#x27;);\n        if (savedTheme &amp;&amp; this.themeBuilder.themes.has(savedTheme)) {\n            this.selector.value = savedTheme;\n            this.themeBuilder.applyTheme(savedTheme);\n        } else {\n            // Apply default theme based on system preference\n            const prefersDark = window.matchMedia(&#x27;(prefers-color-scheme: dark)&#x27;).matches;\n            const defaultTheme = prefersDark ? &#x27;vscode-dark&#x27; : &#x27;github&#x27;;\n            this.selector.value = defaultTheme;\n            this.themeBuilder.applyTheme(defaultTheme);\n        }\n    }\n}\n\n// Initialize theme system\nconst themeBuilder = new SyntaxThemeBuilder();\n\n// Auto-initialize if container exists\ndocument.addEventListener(&#x27;DOMContentLoaded&#x27;, function() {\n    const themeContainer = document.getElementById(&#x27;theme-selector-container&#x27;);\n    if (themeContainer) {\n        new ThemeSelector(themeBuilder, &#x27;theme-selector-container&#x27;);\n    }\n    \n    // Listen for system theme changes\n    const darkModeQuery = window.matchMedia(&#x27;(prefers-color-scheme: dark)&#x27;);\n    darkModeQuery.addListener(function(e) {\n        if (!localStorage.getItem(&#x27;preferred-syntax-theme&#x27;)) {\n            const autoTheme = e.matches ? &#x27;vscode-dark&#x27; : &#x27;github&#x27;;\n            themeBuilder.applyTheme(autoTheme);\n        }\n    });\n});\n```\u003C/span>\n\n\u003Cspan class=\"hljs-section\">## Language-Specific Highlighting Extensions\u003C/span>\n\n\u003Cspan class=\"hljs-section\">### Custom Language Definitions\u003C/span>\n\u003Cspan class=\"hljs-code\">```javascript\n// custom-languages.js - Extended language support\nclass CustomLanguageDefinitions {\n    constructor(prismInstance) {\n        this.Prism = prismInstance;\n        this.defineCustomLanguages();\n    }\n    \n    defineCustomLanguages() {\n        this.defineDockerfile();\n        this.defineNginxConfig();\n        this.defineEnvFiles();\n        this.defineLogFormats();\n        this.defineConfigFormats();\n        this.defineBashWithPrompt();\n        this.defineJSONWithComments();\n        this.defineMarkdownWithMeta();\n    }\n    \n    defineDockerfile() {\n        this.Prism.languages.dockerfile = {\n            &#x27;comment&#x27;: {\n                pattern: /#.*/,\n                greedy: true\n            },\n            &#x27;instruction&#x27;: {\n                pattern: /^\\s*(?:FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\\b/im,\n                alias: &#x27;keyword&#x27;\n            },\n            &#x27;string&#x27;: {\n                pattern: /&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;/,\n                greedy: true\n            },\n            &#x27;variable&#x27;: /\\$(?:\\w+|\\{[^}]*\\})/,\n            &#x27;operator&#x27;: /&amp;&amp;|\\|\\||[&lt;&gt;]=?|[!=]=|[&amp;|]|\\+\\+?|--?|\\*\\*?|\\/\\/?|%|\\^|[?:~]/,\n            &#x27;punctuation&#x27;: /[{}[\\];(),.:]/\n        };\n        \n        this.Prism.languages.docker = this.Prism.languages.dockerfile;\n    }\n    \n    defineNginxConfig() {\n        this.Prism.languages.nginx = {\n            &#x27;comment&#x27;: /#.*/,\n            &#x27;directive&#x27;: {\n                pattern: /\\b(?:server|location|upstream|proxy_pass|listen|server_name|root|index|try_files|error_page|access_log|error_log|gzip|ssl_certificate|ssl_certificate_key|return|rewrite|if|set|add_header|expires|client_max_body_size|worker_processes|events|http|stream)\\b/,\n                alias: &#x27;keyword&#x27;\n            },\n            &#x27;variable&#x27;: /\\$[a-zA-Z_][a-zA-Z0-9_]*/,\n            &#x27;string&#x27;: {\n                pattern: /&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;|&#x27;(?:[^&#x27;\\\\]|\\\\.)*&#x27;/,\n                greedy: true\n            },\n            &#x27;boolean&#x27;: /\\b(?:on|off)\\b/,\n            &#x27;number&#x27;: /\\b\\d+(?:\\.\\d+)?[kmg]?\\b/i,\n            &#x27;operator&#x27;: /[=~]/,\n            &#x27;punctuation&#x27;: /[{};\\[\\]]/\n        };\n    }\n    \n    defineEnvFiles() {\n        this.Prism.languages.env = {\n            &#x27;comment&#x27;: /#.*/,\n            &#x27;variable&#x27;: {\n                pattern: /^[A-Z_][A-Z0-9_]*(?=\\s*=)/m,\n                alias: &#x27;property&#x27;\n            },\n            &#x27;value&#x27;: {\n                pattern: /=.*/,\n                inside: {\n                    &#x27;string&#x27;: {\n                        pattern: /&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;|&#x27;(?:[^&#x27;\\\\]|\\\\.)*&#x27;/,\n                        greedy: true\n                    },\n                    &#x27;variable&#x27;: /\\$\\{?[A-Z_][A-Z0-9_]*\\}?/,\n                    &#x27;number&#x27;: /\\b\\d+(?:\\.\\d+)?\\b/,\n                    &#x27;boolean&#x27;: /\\b(?:true|false|yes|no|on|off)\\b/i\n                }\n            },\n            &#x27;operator&#x27;: /=/\n        };\n        \n        this.Prism.languages.dotenv = this.Prism.languages.env;\n        this.Prism.languages.envfile = this.Prism.languages.env;\n    }\n    \n    defineLogFormats() {\n        this.Prism.languages.log = {\n            &#x27;timestamp&#x27;: {\n                pattern: /^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?(?:Z|[+-]\\d{2}:\\d{2})?|\\[?\\d{2}\\/\\w{3}\\/\\d{4}:\\d{2}:\\d{2}:\\d{2}(?: [+-]\\d{4})?\\]?/m,\n                alias: &#x27;number&#x27;\n            },\n            &#x27;level&#x27;: {\n                pattern: /\\b(?:TRACE|DEBUG|INFO|WARN|WARNING|ERROR|FATAL|CRITICAL|EMERGENCY|ALERT)\\b/i,\n                alias: &#x27;keyword&#x27;\n            },\n            &#x27;ip&#x27;: {\n                pattern: /\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b/,\n                alias: &#x27;number&#x27;\n            },\n            &#x27;url&#x27;: {\n                pattern: /https?:\\/\\/[^\\s]+/,\n                alias: &#x27;string&#x27;\n            },\n            &#x27;status&#x27;: {\n                pattern: /\\b[1-5]\\d{2}\\b/,\n                alias: &#x27;number&#x27;\n            },\n            &#x27;string&#x27;: {\n                pattern: /&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;/,\n                greedy: true\n            },\n            &#x27;uuid&#x27;: {\n                pattern: /\\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\b/i,\n                alias: &#x27;variable&#x27;\n            }\n        };\n    }\n    \n    defineConfigFormats() {\n        this.Prism.languages.ini = {\n            &#x27;comment&#x27;: /^[;#].*/m,\n            &#x27;section&#x27;: {\n                pattern: /^\\[[^\\]]*\\]/m,\n                alias: &#x27;keyword&#x27;\n            },\n            &#x27;property&#x27;: {\n                pattern: /^[^=\\r\\n]+(?=\\s*=)/m,\n                alias: &#x27;attr-name&#x27;\n            },\n            &#x27;value&#x27;: {\n                pattern: /=.*/,\n                inside: {\n                    &#x27;string&#x27;: {\n                        pattern: /&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;/,\n                        greedy: true\n                    },\n                    &#x27;number&#x27;: /\\b\\d+(?:\\.\\d+)?\\b/,\n                    &#x27;boolean&#x27;: /\\b(?:true|false|yes|no|on|off)\\b/i\n                }\n            },\n            &#x27;operator&#x27;: /=/\n        };\n        \n        this.Prism.languages.config = this.Prism.languages.ini;\n        this.Prism.languages.cfg = this.Prism.languages.ini;\n    }\n    \n    defineBashWithPrompt() {\n        this.Prism.languages[&#x27;bash-prompt&#x27;] = this.Prism.util.clone(this.Prism.languages.bash);\n        \n        this.Prism.languages[&#x27;bash-prompt&#x27;][&#x27;prompt&#x27;] = {\n            pattern: /^[$#]\\s*/m,\n            alias: &#x27;keyword&#x27;\n        };\n        \n        this.Prism.languages[&#x27;bash-session&#x27;] = {\n            &#x27;command&#x27;: {\n                pattern: /^[$#]\\s*[^\\r\\n]*$/m,\n                inside: {\n                    &#x27;prompt&#x27;: {\n                        pattern: /^[$#]\\s*/,\n                        alias: &#x27;keyword&#x27;\n                    },\n                    &#x27;bash&#x27;: {\n                        pattern: /[\\s\\S]+/,\n                        alias: &#x27;language-bash&#x27;,\n                        inside: this.Prism.languages.bash\n                    }\n                }\n            },\n            &#x27;output&#x27;: {\n                pattern: /^(?![$#]\\s)[^\\r\\n]*$/m,\n                alias: &#x27;string&#x27;\n            }\n        };\n    }\n    \n    defineJSONWithComments() {\n        this.Prism.languages.jsonc = this.Prism.util.clone(this.Prism.languages.json);\n        \n        this.Prism.languages.jsonc.comment = {\n            pattern: /\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\//,\n            greedy: true\n        };\n        \n        this.Prism.languages[&#x27;json5&#x27;] = this.Prism.util.clone(this.Prism.languages.jsonc);\n        \n        // JSON5 additional features\n        this.Prism.languages.json5.property = {\n            pattern: /(?:[a-zA-Z_$][a-zA-Z0-9_$]*|&#x27;(?:[^&#x27;\\\\]|\\\\.)*&#x27;|&quot;(?:[^&quot;\\\\]|\\\\.)*&quot;)(?=\\s*:)/,\n            greedy: true,\n            alias: &#x27;property&#x27;\n        };\n    }\n    \n    defineMarkdownWithMeta() {\n        this.Prism.languages[&#x27;markdown-meta&#x27;] = this.Prism.util.clone(this.Prism.languages.markdown);\n        \n        this.Prism.languages[&#x27;markdown-meta&#x27;][&#x27;frontmatter&#x27;] = {\n            pattern: /^---[\\s\\S]*?---/,\n            inside: {\n                &#x27;punctuation&#x27;: /^---|---$/m,\n                &#x27;yaml&#x27;: {\n                    pattern: /[\\s\\S]+(?=\\r?\\n---$)/,\n                    alias: &#x27;language-yaml&#x27;,\n                    inside: this.Prism.languages.yaml\n                }\n            }\n        };\n        \n        // Enhanced code block highlighting\n        this.Prism.languages[&#x27;markdown-meta&#x27;][&#x27;code-block&#x27;] = {\n            pattern: /```\u003C/span>[\\s\\S]\u003Cspan class=\"hljs-emphasis\">*?```/,\n            inside: {\n                &#x27;code-info&#x27;: {\n                    pattern: /```[a-z]*\u003C/span>(?:\\{[^}]\u003Cspan class=\"hljs-emphasis\">*\\})?/,\n                    alias: &#x27;keyword&#x27;\n                },\n                &#x27;code&#x27;: {\n                    pattern: /[\\s\\S]+?(?=```$)/,\n                    alias: &#x27;language-markup&#x27;\n                },\n                &#x27;punctuation&#x27;: /```/\n            }\n        };\n    }\n    \n    // Utility method to register all languages at once\n    registerAll() {\n        Object.keys(this).forEach(method =&gt; {\n            if (method.startsWith(&#x27;define&#x27;) &amp;&amp; typeof this[method] === &#x27;function&#x27;) {\n                this[\u003Cspan class=\"hljs-string\">method\u003C/span>](\u003Cspan class=\"hljs-link\">\u003C/span>);\n            }\n        });\n    }\n}\n\n// Auto-register custom languages when Prism is available\ndocument.addEventListener(&#x27;DOMContentLoaded&#x27;, function() {\n    if (typeof Prism !== &#x27;undefined&#x27;) {\n        new CustomLanguageDefinitions(Prism);\n    }\n});\n```\n\n## Interactive Code Examples\n\n### Live Code Execution\n```html\n&lt;!-- interactive-examples.html --&gt;\n\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;interactive-code-example&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">data-language\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;javascript&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;code-tabs&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">button\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;tab active&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">data-tab\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;code&quot;\u003C/span>&gt;\u003C/span>\u003C/span>Code\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">button\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;tab&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">data-tab\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;result&quot;\u003C/span>&gt;\u003C/span>\u003C/span>Result\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">button\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;tab&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">data-tab\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;console&quot;\u003C/span>&gt;\u003C/span>\u003C/span>Console\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>\n    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n    \n    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;tab-content&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;tab-pane active&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">data-pane\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;code&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">textarea\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;code-editor&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">spellcheck\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;false&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n// Interactive JavaScript Example\nfunction fibonacci(n) {\n    if (n &lt;= 1) return n;\n    return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\n// Calculate first 10 Fibonacci numbers\nfor (let i = 0; i &lt; 10; i++) {\n    console.log(`F(${i}) = ${fibonacci(i)}`);\n}\n\n// Display result in page\nconst result = fibonacci(8);\ndocument.body.innerHTML += `\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">h3\u003C/span>&gt;\u003C/span>\u003C/span>F(8) = ${result}\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">h3\u003C/span>&gt;\u003C/span>\u003C/span>`;\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">textarea\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n        \n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;tab-pane&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">data-pane\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;result&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">iframe\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;result-frame&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">sandbox\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;allow-scripts&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">iframe\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n        \n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;tab-pane&quot;\u003C/span> \u003Cspan class=\"hljs-attr\">data-pane\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;console&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;console-output&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n    \n    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;code-controls&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">button\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;run-button&quot;\u003C/span>&gt;\u003C/span>\u003C/span>▶ Run Code\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">button\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;reset-button&quot;\u003C/span>&gt;\u003C/span>\u003C/span>Reset\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>\n        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">button\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;share-button&quot;\u003C/span>&gt;\u003C/span>\u003C/span>Share\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>\n    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n\n\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">script\u003C/span>&gt;\u003C/span>\u003C/span>\nclass InteractiveCodeExample {\n    constructor(container) {\n        this.container = container;\n        this.language = container.dataset.language || &#x27;javascript&#x27;;\n        this.codeEditor = container.querySelector(&#x27;.code-editor&#x27;);\n        this.resultFrame = container.querySelector(&#x27;.result-frame&#x27;);\n        this.consoleOutput = container.querySelector(&#x27;.console-output&#x27;);\n        this.originalCode = this.codeEditor.value;\n        \n        this.initializeTabs();\n        this.initializeControls();\n        this.initializeEditor();\n        this.setupConsoleRedirect();\n    }\n    \n    initializeTabs() {\n        const tabs = this.container.querySelectorAll(&#x27;.tab&#x27;);\n        const panes = this.container.querySelectorAll(&#x27;.tab-pane&#x27;);\n        \n        tabs.forEach(tab =&gt; {\n            tab.addEventListener(&#x27;click&#x27;, () =&gt; {\n                const targetTab = tab.dataset.tab;\n                \n                // Update tab states\n                tabs.forEach(t =&gt; t.classList.remove(&#x27;active&#x27;));\n                tab.classList.add(&#x27;active&#x27;);\n                \n                // Update pane visibility\n                panes.forEach(pane =&gt; {\n                    if (pane.dataset.pane === targetTab) {\n                        pane.classList.add(&#x27;active&#x27;);\n                    } else {\n                        pane.classList.remove(&#x27;active&#x27;);\n                    }\n                });\n            });\n        });\n    }\n    \n    initializeControls() {\n        const runButton = this.container.querySelector(&#x27;.run-button&#x27;);\n        const resetButton = this.container.querySelector(&#x27;.reset-button&#x27;);\n        const shareButton = this.container.querySelector(&#x27;.share-button&#x27;);\n        \n        runButton.addEventListener(&#x27;click&#x27;, () =&gt; this.runCode());\n        resetButton.addEventListener(&#x27;click&#x27;, () =&gt; this.resetCode());\n        shareButton.addEventListener(&#x27;click&#x27;, () =&gt; this.shareCode());\n        \n        // Auto-run on code change (debounced)\n        let autoRunTimeout;\n        this.codeEditor.addEventListener(&#x27;input&#x27;, () =&gt; {\n            clearTimeout(autoRunTimeout);\n            autoRunTimeout = setTimeout(() =&gt; {\n                this.runCode();\n            }, 1000);\n        });\n    }\n    \n    initializeEditor() {\n        // Add syntax highlighting to textarea\n        this.codeEditor.addEventListener(&#x27;input&#x27;, () =&gt; {\n            this.updateSyntaxHighlighting();\n        });\n        \n        // Add keyboard shortcuts\n        this.codeEditor.addEventListener(&#x27;keydown&#x27;, (e) =&gt; {\n            if (e.ctrlKey || e.metaKey) {\n                switch (e.key) {\n                    case &#x27;Enter&#x27;:\n                        e.preventDefault();\n                        this.runCode();\n                        break;\n                    case &#x27;r&#x27;:\n                        e.preventDefault();\n                        this.resetCode();\n                        break;\n                }\n            }\n            \n            // Handle tab indentation\n            if (e.key === &#x27;Tab&#x27;) {\n                e.preventDefault();\n                const start = this.codeEditor.selectionStart;\n                const end = this.codeEditor.selectionEnd;\n                const value = this.codeEditor.value;\n                \n                this.codeEditor.value = value.substring(0, start) + &#x27;    &#x27; + value.substring(end);\n                this.codeEditor.selectionStart = this.codeEditor.selectionEnd = start + 4;\n            }\n        });\n        \n        // Initial syntax highlighting\n        this.updateSyntaxHighlighting();\n    }\n    \n    updateSyntaxHighlighting() {\n        if (typeof Prism !== &#x27;undefined&#x27; &amp;&amp; Prism.languages[this.language]) {\n            const code = this.codeEditor.value;\n            const highlighted = Prism.highlight(code, Prism.languages[this.language], this.language);\n            \n            // Update background highlighting (would need additional implementation)\n            this.updateEditorBackground(highlighted);\n        }\n    }\n    \n    setupConsoleRedirect() {\n        // Create console proxy for capturing output\n        this.consoleLogs = [];\n        \n        const originalLog = console.log;\n        const originalError = console.error;\n        const originalWarn = console.warn;\n        \n        window.interceptConsole = (method, ...args) =&gt; {\n            this.consoleLogs.push({\n                method: method,\n                args: args,\n                timestamp: new Date()\n            });\n            \n            this.updateConsoleDisplay();\n            \n            // Call original method\n            if (method === &#x27;log&#x27;) originalLog(...args);\n            else if (method === &#x27;error&#x27;) originalError(...args);\n            else if (method === &#x27;warn&#x27;) originalWarn(...args);\n        };\n    }\n    \n    runCode() {\n        try {\n            this.clearConsole();\n            this.clearResult();\n            \n            if (this.language === &#x27;javascript&#x27;) {\n                this.runJavaScript();\n            } else if (this.language === &#x27;html&#x27;) {\n                this.runHTML();\n            } else if (this.language === &#x27;css&#x27;) {\n                this.runCSS();\n            }\n            \n        } catch (error) {\n            this.showError(error);\n        }\n    }\n    \n    runJavaScript() {\n        const code = this.codeEditor.value;\n        \n        // Create sandbox environment\n        const sandboxCode = `\n            (function() {\n                const console = {\n                    log: (...args) =&gt; parent.interceptConsole(&#x27;log&#x27;, ...args),\n                    error: (...args) =&gt; parent.interceptConsole(&#x27;error&#x27;, ...args),\n                    warn: (...args) =&gt; parent.interceptConsole(&#x27;warn&#x27;, ...args)\n                };\n                \n                try {\n                    ${code}\n                } catch (error) {\n                    console.error(error.message);\n                }\n            })();\n        `;\n        \n        // Execute in iframe\n        const frameDoc = this.resultFrame.contentDocument || this.resultFrame.contentWindow.document;\n        frameDoc.open();\n        frameDoc.write(`\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"language-handlebars\">\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">html\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"language-handlebars\">\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">head\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\u003C/span>\n                    \u003Cspan class=\"language-xml\">\u003Cspan class=\"language-handlebars\">\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">style\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\u003C/span>\n                        body { \n                            font-family: -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, Roboto, sans-serif;\n                            margin: 16px;\n                            line-height: 1.6;\n                        }\n                        h1, h2, h3 { margin-top: 0; }\n                    \u003Cspan class=\"language-xml\">\u003Cspan class=\"language-handlebars\">\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">style\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"language-handlebars\">\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">head\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"language-handlebars\">\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">body\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\u003C/span>\n                    \u003Cspan class=\"language-xml\">\u003Cspan class=\"language-handlebars\">\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">script\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\u003C/span>${sandboxCode}\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">script\u003C/span>&gt;\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">body\u003C/span>&gt;\u003C/span>\u003C/span>\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">html\u003C/span>&gt;\u003C/span>\u003C/span>\n        `);\n        frameDoc.close();\n    }\n    \n    runHTML() {\n        const code = this.codeEditor.value;\n        \n        const frameDoc = this.resultFrame.contentDocument || this.resultFrame.contentWindow.document;\n        frameDoc.open();\n        frameDoc.write(code);\n        frameDoc.close();\n    }\n    \n    runCSS() {\n        const code = this.codeEditor.value;\n        \n        const frameDoc = this.resultFrame.contentDocument || this.resultFrame.contentWindow.document;\n        frameDoc.open();\n        frameDoc.write(`\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">html\u003C/span>&gt;\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">head\u003C/span>&gt;\u003C/span>\u003C/span>\n                    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">style\u003C/span>&gt;\u003C/span>\u003C/span>${code}\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">style\u003C/span>&gt;\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">head\u003C/span>&gt;\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">body\u003C/span>&gt;\u003C/span>\u003C/span>\n                    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;demo-content&quot;\u003C/span>&gt;\u003C/span>\u003C/span>\n                        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">h1\u003C/span>&gt;\u003C/span>\u003C/span>CSS Demo\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">h1\u003C/span>&gt;\u003C/span>\u003C/span>\n                        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">p\u003C/span>&gt;\u003C/span>\u003C/span>This is a paragraph to demonstrate your CSS.\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">p\u003C/span>&gt;\u003C/span>\u003C/span>\n                        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>Sample Button\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">button\u003C/span>&gt;\u003C/span>\u003C/span>\n                        \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">div\u003C/span> \u003Cspan class=\"hljs-attr\">class\u003C/span>=\u003Cspan class=\"hljs-string\">&quot;box&quot;\u003C/span>&gt;\u003C/span>\u003C/span>Sample Box\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n                    \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">div\u003C/span>&gt;\u003C/span>\u003C/span>\n                \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">body\u003C/span>&gt;\u003C/span>\u003C/span>\n            \u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">html\u003C/span>&gt;\u003C/span>\u003C/span>\n        `);\n        frameDoc.close();\n    }\n    \n    clearConsole() {\n        this.consoleLogs = [];\n        this.updateConsoleDisplay();\n    }\n    \n    clearResult() {\n        const frameDoc = this.resultFrame.contentDocument || this.resultFrame.contentWindow.document;\n        frameDoc.open();\n        frameDoc.write(&#x27;\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">html\u003C/span>&gt;\u003C/span>\u003C/span>\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;\u003Cspan class=\"hljs-name\">body\u003C/span>&gt;\u003C/span>\u003C/span>\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">body\u003C/span>&gt;\u003C/span>\u003C/span>\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">html\u003C/span>&gt;\u003C/span>\u003C/span>&#x27;);\n        frameDoc.close();\n    }\n    \n    updateConsoleDisplay() {\n        this.consoleOutput.innerHTML = &#x27;&#x27;;\n        \n        this.consoleLogs.forEach(log =&gt; {\n            const logElement = document.createElement(&#x27;div&#x27;);\n            logElement.className = `console-${log.method}`;\n            \n            const timestamp = document.createElement(&#x27;span&#x27;);\n            timestamp.className = &#x27;console-timestamp&#x27;;\n            timestamp.textContent = log.timestamp.toLocaleTimeString();\n            \n            const message = document.createElement(&#x27;span&#x27;);\n            message.className = &#x27;console-message&#x27;;\n            message.textContent = log.args.join(&#x27; &#x27;);\n            \n            logElement.appendChild(timestamp);\n            logElement.appendChild(message);\n            this.consoleOutput.appendChild(logElement);\n        });\n        \n        // Auto-scroll to bottom\n        this.consoleOutput.scrollTop = this.consoleOutput.scrollHeight;\n    }\n    \n    showError(error) {\n        this.consoleLogs.push({\n            method: &#x27;error&#x27;,\n            args: [error.message],\n            timestamp: new Date()\n        });\n        this.updateConsoleDisplay();\n    }\n    \n    resetCode() {\n        this.codeEditor.value = this.originalCode;\n        this.clearConsole();\n        this.clearResult();\n        this.updateSyntaxHighlighting();\n    }\n    \n    shareCode() {\n        const code = this.codeEditor.value;\n        const shareData = {\n            language: this.language,\n            code: code\n        };\n        \n        // Create shareable URL\n        const shareUrl = this.createShareUrl(shareData);\n        \n        if (navigator.share) {\n            navigator.share({\n                title: &#x27;Code Example&#x27;,\n                text: &#x27;Check out this code example&#x27;,\n                url: shareUrl\n            });\n        } else {\n            // Fallback: copy to clipboard\n            navigator.clipboard.writeText(shareUrl).then(() =&gt; {\n                this.showShareFeedback();\n            });\n        }\n    }\n    \n    createShareUrl(data) {\n        const encoded = btoa(JSON.stringify(data));\n        return `${window.location.origin}${window.location.pathname}?code=${encoded}`;\n    }\n    \n    showShareFeedback() {\n        const feedback = document.createElement(&#x27;div&#x27;);\n        feedback.className = &#x27;share-feedback&#x27;;\n        feedback.textContent = &#x27;Share URL copied to clipboard!&#x27;;\n        \n        this.container.appendChild(feedback);\n        \n        setTimeout(() =&gt; {\n            feedback.classList.add(&#x27;show&#x27;);\n        }, 10);\n        \n        setTimeout(() =&gt; {\n            feedback.classList.remove(&#x27;show&#x27;);\n            setTimeout(() =&gt; {\n                this.container.removeChild(feedback);\n            }, 300);\n        }, 2000);\n    }\n}\n\n// CSS for interactive examples\nconst interactiveExampleStyles = `\n.interactive-code-example {\n    margin: 2rem 0;\n    border: 1px solid #e1e4e8;\n    border-radius: 8px;\n    background: #ffffff;\n    font-family: -apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, Roboto, sans-serif;\n    box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.code-tabs {\n    display: flex;\n    background: #f6f8fa;\n    border-bottom: 1px solid #e1e4e8;\n    border-radius: 8px 8px 0 0;\n    overflow: hidden;\n}\n\n.code-tabs .tab {\n    background: none;\n    border: none;\n    padding: 12px 20px;\n    cursor: pointer;\n    font-size: 14px;\n    font-weight: 500;\n    color: #586069;\n    border-bottom: 3px solid transparent;\n    transition: all 0.2s ease;\n}\n\n.code-tabs .tab:hover {\n    background: #e1e4e8;\n    color: #24292e;\n}\n\n.code-tabs .tab.active {\n    background: #ffffff;\n    color: #24292e;\n    border-bottom-color: #007bff;\n}\n\n.tab-content {\n    position: relative;\n    min-height: 300px;\n}\n\n.tab-pane {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    display: none;\n    padding: 16px;\n}\n\n.tab-pane.active {\n    display: block;\n}\n\n.code-editor {\n    width: 100%;\n    height: 100%;\n    min-height: 250px;\n    border: none;\n    outline: none;\n    resize: vertical;\n    font-family: &#x27;Fira Code&#x27;, &#x27;Consolas&#x27;, &#x27;Monaco&#x27;, monospace;\n    font-size: 14px;\n    line-height: 1.5;\n    tab-size: 4;\n    background: transparent;\n    color: inherit;\n}\n\n.result-frame {\n    width: 100%;\n    height: 250px;\n    border: 1px solid #e1e4e8;\n    border-radius: 4px;\n    background: white;\n}\n\n.console-output {\n    height: 250px;\n    overflow-y: auto;\n    border: 1px solid #e1e4e8;\n    border-radius: 4px;\n    background: #1e1e1e;\n    color: #d4d4d4;\n    font-family: &#x27;Fira Code&#x27;, &#x27;Consolas&#x27;, monospace;\n    font-size: 13px;\n    padding: 8px;\n}\n\n.console-output div {\n    margin: 2px 0;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n}\n\n.console-timestamp {\n    color: #858585;\n    font-size: 11px;\n    min-width: 80px;\n}\n\n.console-log {\n    color: #d4d4d4;\n}\n\n.console-error {\n    color: #f48771;\n}\n\n.console-warn {\n    color: #dcdcaa;\n}\n\n.code-controls {\n    display: flex;\n    gap: 8px;\n    padding: 12px 16px;\n    background: #f6f8fa;\n    border-top: 1px solid #e1e4e8;\n    border-radius: 0 0 8px 8px;\n}\n\n.code-controls button {\n    padding: 8px 16px;\n    border: 1px solid #e1e4e8;\n    border-radius: 4px;\n    background: white;\n    color: #24292e;\n    font-size: 14px;\n    font-weight: 500;\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.code-controls button:hover {\n    background: #f3f4f6;\n    border-color: #d0d7de;\n}\n\n.run-button {\n    background: #2ea043 !important;\n    color: white !important;\n    border-color: #2ea043 !important;\n}\n\n.run-button:hover {\n    background: #2c974b !important;\n}\n\n.share-feedback {\n    position: absolute;\n    top: 8px;\n    right: 8px;\n    background: #28a745;\n    color: white;\n    padding: 8px 12px;\n    border-radius: 4px;\n    font-size: 12px;\n    opacity: 0;\n    transform: translateY(-10px);\n    transition: all 0.3s ease;\n    z-index: 1000;\n}\n\n.share-feedback.show {\n    opacity: 1;\n    transform: translateY(0);\n}\n\n@media (max-width: 768px) {\n    .code-tabs {\n        flex-wrap: wrap;\n    }\n    \n    .code-tabs .tab {\n        flex: 1;\n        min-width: 0;\n        padding: 10px 12px;\n        font-size: 13px;\n    }\n    \n    .tab-pane {\n        padding: 12px;\n    }\n    \n    .code-editor {\n        font-size: 13px;\n    }\n    \n    .code-controls {\n        flex-wrap: wrap;\n        gap: 6px;\n        padding: 10px 12px;\n    }\n    \n    .code-controls button {\n        flex: 1;\n        min-width: 0;\n        font-size: 13px;\n        padding: 8px 12px;\n    }\n}\n`;\n\n// Inject styles\nconst style = document.createElement(&#x27;style&#x27;);\nstyle.textContent = interactiveExampleStyles;\ndocument.head.appendChild(style);\n\n// Initialize all interactive examples\ndocument.addEventListener(&#x27;DOMContentLoaded&#x27;, function() {\n    const examples = document.querySelectorAll(&#x27;.interactive-code-example&#x27;);\n    examples.forEach(example =&gt; {\n        new InteractiveCodeExample(example);\n    });\n});\n\u003Cspan class=\"language-xml\">\u003Cspan class=\"hljs-tag\">&lt;/\u003Cspan class=\"hljs-name\">script\u003C/span>&gt;\u003C/span>\u003C/span>\u003C/span>\n\u003C/code>\u003C/pre>\u003Ch2 id=\"integration-with-documentation-systems\">Integration with Documentation Systems\u003C/h2>\n\u003Cp>Advanced syntax highlighting integrates seamlessly with modern documentation workflows. When combined with \u003Ca href=\"/blog/markdown-table-data-validation-and-quality-assurance-complete-guide\">table data validation systems\u003C/a>, code highlighting ensures technical accuracy while maintaining visual consistency across complex documentation that includes both tabular data and code examples.\u003C/p>\n\u003Cp>For comprehensive technical writing, syntax highlighting works effectively with \u003Ca href=\"/blog/markdown-accessibility-complete-guide\">accessibility compliance systems\u003C/a> to ensure code examples remain readable for users with visual impairments while supporting screen readers and assistive technologies through proper semantic markup and high-contrast themes.\u003C/p>\n\u003Cp>When building sophisticated documentation platforms, syntax highlighting complements \u003Ca href=\"/blog/markdown-table-data-filtering-search-complete-guide\">content filtering and search capabilities\u003C/a> by enabling searchable code indices, syntax-aware filtering, and intelligent code discovery that helps users find relevant programming examples across large technical documentation repositories.\u003C/p>\n\u003Ch2 id=\"performance-optimization-and-best-practices\">Performance Optimization and Best Practices\u003C/h2>\n\u003Ch3 id=\"lazy-loading-implementation\">Lazy Loading Implementation\u003C/h3>\n\u003Cpre>\u003Ccode class=\"hljs language-javascript\">\u003Cspan class=\"hljs-comment\">// lazy-syntax-highlighting.js - Performance-optimized code highlighting\u003C/span>\n\u003Cspan class=\"hljs-keyword\">class\u003C/span> \u003Cspan class=\"hljs-title class_\">LazySyntaxHighlighter\u003C/span> {\n    \u003Cspan class=\"hljs-title function_\">constructor\u003C/span>(\u003Cspan class=\"hljs-params\">options = {}\u003C/span>) {\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span> = {\n            \u003Cspan class=\"hljs-attr\">threshold\u003C/span>: \u003Cspan class=\"hljs-number\">0.1\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">rootMargin\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;50px&#x27;\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">enableVirtualization\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">chunkSize\u003C/span>: \u003Cspan class=\"hljs-number\">50\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">enableWorker\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            ...options\n        };\n        \n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span> = \u003Cspan class=\"hljs-literal\">null\u003C/span>;\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">highlightQueue\u003C/span> = [];\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">isProcessing\u003C/span> = \u003Cspan class=\"hljs-literal\">false\u003C/span>;\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span> = \u003Cspan class=\"hljs-literal\">null\u003C/span>;\n        \n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">init\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">init\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">setupIntersectionObserver\u003C/span>();\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">setupWorker\u003C/span>();\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">observeCodeBlocks\u003C/span>();\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">bindEvents\u003C/span>();\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">setupIntersectionObserver\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-string\">&#x27;IntersectionObserver&#x27;\u003C/span> \u003Cspan class=\"hljs-keyword\">in\u003C/span> \u003Cspan class=\"hljs-variable language_\">window\u003C/span>) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span> = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">IntersectionObserver\u003C/span>(\n                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">handleIntersection\u003C/span>.\u003Cspan class=\"hljs-title function_\">bind\u003C/span>(\u003Cspan class=\"hljs-variable language_\">this\u003C/span>),\n                {\n                    \u003Cspan class=\"hljs-attr\">threshold\u003C/span>: \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">threshold\u003C/span>,\n                    \u003Cspan class=\"hljs-attr\">rootMargin\u003C/span>: \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">rootMargin\u003C/span>\n                }\n            );\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">setupWorker\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableWorker\u003C/span> &amp;&amp; \u003Cspan class=\"hljs-string\">&#x27;Worker&#x27;\u003C/span> \u003Cspan class=\"hljs-keyword\">in\u003C/span> \u003Cspan class=\"hljs-variable language_\">window\u003C/span>) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> workerScript = \u003Cspan class=\"hljs-string\">`\n                importScripts(&#x27;https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js&#x27;);\n                \n                const languages = new Map();\n                \n                self.addEventListener(&#x27;message&#x27;, async function(e) {\n                    const { id, code, language, action } = e.data;\n                    \n                    if (action === &#x27;highlight&#x27;) {\n                        try {\n                            if (!languages.has(language)) {\n                                await loadLanguage(language);\n                            }\n                            \n                            const highlighted = Prism.highlight(code, Prism.languages[language], language);\n                            \n                            self.postMessage({\n                                id: id,\n                                highlighted: highlighted,\n                                success: true\n                            });\n                        } catch (error) {\n                            self.postMessage({\n                                id: id,\n                                error: error.message,\n                                success: false\n                            });\n                        }\n                    }\n                });\n                \n                async function loadLanguage(language) {\n                    if (languages.has(language)) return;\n                    \n                    try {\n                        importScripts(\\`https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-\\${language}.min.js\\`);\n                        languages.set(language, true);\n                    } catch (error) {\n                        console.warn(&#x27;Failed to load language:&#x27;, language);\n                    }\n                }\n            `\u003C/span>;\n            \n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> blob = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">Blob\u003C/span>([workerScript], { \u003Cspan class=\"hljs-attr\">type\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;application/javascript&#x27;\u003C/span> });\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span> = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">Worker\u003C/span>(\u003Cspan class=\"hljs-variable constant_\">URL\u003C/span>.\u003Cspan class=\"hljs-title function_\">createObjectURL\u003C/span>(blob));\n            \n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span>.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;message&#x27;\u003C/span>, \u003Cspan class=\"hljs-function\">(\u003Cspan class=\"hljs-params\">e\u003C/span>) =&gt;\u003C/span> {\n                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">handleWorkerMessage\u003C/span>(e.\u003Cspan class=\"hljs-property\">data\u003C/span>);\n            });\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">observeCodeBlocks\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> codeBlocks = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">querySelectorAll\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre[class*=&quot;language-&quot;], code[class*=&quot;language-&quot;]&#x27;\u003C/span>);\n        \n        codeBlocks.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">block\u003C/span> =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span>) {\n                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span>.\u003Cspan class=\"hljs-title function_\">observe\u003C/span>(block);\n            } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n                \u003Cspan class=\"hljs-comment\">// Fallback for browsers without IntersectionObserver\u003C/span>\n                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightBlock\u003C/span>(block);\n            }\n        });\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">handleIntersection\u003C/span>(\u003Cspan class=\"hljs-params\">entries\u003C/span>) {\n        entries.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">entry\u003C/span> =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (entry.\u003Cspan class=\"hljs-property\">isIntersecting\u003C/span>) {\n                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightBlock\u003C/span>(entry.\u003Cspan class=\"hljs-property\">target\u003C/span>);\n                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span>.\u003Cspan class=\"hljs-title function_\">unobserve\u003C/span>(entry.\u003Cspan class=\"hljs-property\">target\u003C/span>);\n            }\n        });\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">highlightBlock\u003C/span>(\u003Cspan class=\"hljs-params\">block\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (block.\u003Cspan class=\"hljs-property\">dataset\u003C/span>.\u003Cspan class=\"hljs-property\">highlighted\u003C/span> === \u003Cspan class=\"hljs-string\">&#x27;true&#x27;\u003C/span>) \u003Cspan class=\"hljs-keyword\">return\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> code = block.\u003Cspan class=\"hljs-property\">textContent\u003C/span>;\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> language = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">extractLanguage\u003C/span>(block);\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">options\u003C/span>.\u003Cspan class=\"hljs-property\">enableVirtualization\u003C/span> &amp;&amp; code.\u003Cspan class=\"hljs-property\">length\u003C/span> &gt; \u003Cspan class=\"hljs-number\">5000\u003C/span>) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightLargeBlock\u003C/span>(block, code, language);\n        } \u003Cspan class=\"hljs-keyword\">else\u003C/span> \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span> &amp;&amp; code.\u003Cspan class=\"hljs-property\">length\u003C/span> &gt; \u003Cspan class=\"hljs-number\">1000\u003C/span>) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightWithWorker\u003C/span>(block, code, language);\n        } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightSynchronously\u003C/span>(block, code, language);\n        }\n        \n        block.\u003Cspan class=\"hljs-property\">dataset\u003C/span>.\u003Cspan class=\"hljs-property\">highlighted\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;true&#x27;\u003C/span>;\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">highlightSynchronously\u003C/span>(\u003Cspan class=\"hljs-params\">block, code, language\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-title class_\">Prism\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span> &amp;&amp; \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>[language]) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> highlighted = \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlight\u003C/span>(code, \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>[language], language);\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">applyHighlighting\u003C/span>(block, highlighted);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">highlightWithWorker\u003C/span>(\u003Cspan class=\"hljs-params\">block, code, language\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (!\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span>) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightSynchronously\u003C/span>(block, code, language);\n            \u003Cspan class=\"hljs-keyword\">return\u003C/span>;\n        }\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> id = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">generateId\u003C/span>();\n        block.\u003Cspan class=\"hljs-property\">dataset\u003C/span>.\u003Cspan class=\"hljs-property\">highlightId\u003C/span> = id;\n        \n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span>.\u003Cspan class=\"hljs-title function_\">postMessage\u003C/span>({\n            \u003Cspan class=\"hljs-attr\">id\u003C/span>: id,\n            \u003Cspan class=\"hljs-attr\">code\u003C/span>: code,\n            \u003Cspan class=\"hljs-attr\">language\u003C/span>: language,\n            \u003Cspan class=\"hljs-attr\">action\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;highlight&#x27;\u003C/span>\n        });\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">highlightLargeBlock\u003C/span>(\u003Cspan class=\"hljs-params\">block, code, language\u003C/span>) {\n        \u003Cspan class=\"hljs-comment\">// Implement virtual scrolling for very large code blocks\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> lines = code.\u003Cspan class=\"hljs-title function_\">split\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;\\n&#x27;\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> visibleLines = \u003Cspan class=\"hljs-number\">100\u003C/span>; \u003Cspan class=\"hljs-comment\">// Show first 100 lines initially\u003C/span>\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (lines.\u003Cspan class=\"hljs-property\">length\u003C/span> &lt;= visibleLines) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightSynchronously\u003C/span>(block, code, language);\n            \u003Cspan class=\"hljs-keyword\">return\u003C/span>;\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Create virtual scrolling container\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> container = \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">createVirtualContainer\u003C/span>(block);\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> visibleCode = lines.\u003Cspan class=\"hljs-title function_\">slice\u003C/span>(\u003Cspan class=\"hljs-number\">0\u003C/span>, visibleLines).\u003Cspan class=\"hljs-title function_\">join\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;\\n&#x27;\u003C/span>);\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-title class_\">Prism\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span> &amp;&amp; \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>[language]) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> highlighted = \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlight\u003C/span>(visibleCode, \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>[language], language);\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">applyHighlighting\u003C/span>(container.\u003Cspan class=\"hljs-property\">codeElement\u003C/span>, highlighted);\n        }\n        \n        \u003Cspan class=\"hljs-comment\">// Add load more functionality\u003C/span>\n        \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">setupLazyLoading\u003C/span>(container, lines, language, visibleLines);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">createVirtualContainer\u003C/span>(\u003Cspan class=\"hljs-params\">originalBlock\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> container = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;div&#x27;\u003C/span>);\n        container.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;virtual-code-container&#x27;\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> codeElement = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;code&#x27;\u003C/span>);\n        codeElement.\u003Cspan class=\"hljs-property\">className\u003C/span> = originalBlock.\u003Cspan class=\"hljs-property\">className\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> loadMoreButton = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;button&#x27;\u003C/span>);\n        loadMoreButton.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;Load More Lines&#x27;\u003C/span>;\n        loadMoreButton.\u003Cspan class=\"hljs-property\">className\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;load-more-code&#x27;\u003C/span>;\n        \n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> pre = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre&#x27;\u003C/span>);\n        pre.\u003Cspan class=\"hljs-property\">className\u003C/span> = originalBlock.\u003Cspan class=\"hljs-property\">className\u003C/span>;\n        pre.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(codeElement);\n        \n        container.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(pre);\n        container.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(loadMoreButton);\n        \n        originalBlock.\u003Cspan class=\"hljs-property\">parentNode\u003C/span>.\u003Cspan class=\"hljs-title function_\">replaceChild\u003C/span>(container, originalBlock);\n        \n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> {\n            \u003Cspan class=\"hljs-attr\">container\u003C/span>: container,\n            \u003Cspan class=\"hljs-attr\">codeElement\u003C/span>: codeElement,\n            \u003Cspan class=\"hljs-attr\">loadMoreButton\u003C/span>: loadMoreButton,\n            \u003Cspan class=\"hljs-attr\">pre\u003C/span>: pre\n        };\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">setupLazyLoading\u003C/span>(\u003Cspan class=\"hljs-params\">virtualContainer, allLines, language, currentlyVisible\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> { loadMoreButton, codeElement } = virtualContainer;\n        \u003Cspan class=\"hljs-keyword\">let\u003C/span> visibleCount = currentlyVisible;\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> loadIncrement = \u003Cspan class=\"hljs-number\">50\u003C/span>;\n        \n        loadMoreButton.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;click&#x27;\u003C/span>, \u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> nextBatch = allLines.\u003Cspan class=\"hljs-title function_\">slice\u003C/span>(visibleCount, visibleCount + loadIncrement);\n            \n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (nextBatch.\u003Cspan class=\"hljs-property\">length\u003C/span> &gt; \u003Cspan class=\"hljs-number\">0\u003C/span>) {\n                \u003Cspan class=\"hljs-keyword\">const\u003C/span> batchCode = nextBatch.\u003Cspan class=\"hljs-title function_\">join\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;\\n&#x27;\u003C/span>);\n                \n                \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-keyword\">typeof\u003C/span> \u003Cspan class=\"hljs-title class_\">Prism\u003C/span> !== \u003Cspan class=\"hljs-string\">&#x27;undefined&#x27;\u003C/span> &amp;&amp; \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>[language]) {\n                    \u003Cspan class=\"hljs-keyword\">const\u003C/span> highlighted = \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlight\u003C/span>(batchCode, \u003Cspan class=\"hljs-title class_\">Prism\u003C/span>.\u003Cspan class=\"hljs-property\">languages\u003C/span>[language], language);\n                    \n                    \u003Cspan class=\"hljs-comment\">// Append highlighted code\u003C/span>\n                    \u003Cspan class=\"hljs-keyword\">const\u003C/span> span = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;span&#x27;\u003C/span>);\n                    span.\u003Cspan class=\"hljs-property\">innerHTML\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;\\n&#x27;\u003C/span> + highlighted;\n                    codeElement.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(span);\n                }\n                \n                visibleCount += loadIncrement;\n                \n                \u003Cspan class=\"hljs-keyword\">if\u003C/span> (visibleCount &gt;= allLines.\u003Cspan class=\"hljs-property\">length\u003C/span>) {\n                    loadMoreButton.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">display\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;none&#x27;\u003C/span>;\n                } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n                    loadMoreButton.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">`Load More Lines (\u003Cspan class=\"hljs-subst\">${allLines.length - visibleCount}\u003C/span> remaining)`\u003C/span>;\n                }\n            }\n        });\n        \n        \u003Cspan class=\"hljs-comment\">// Initially hide button if all lines are visible\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (visibleCount &gt;= allLines.\u003Cspan class=\"hljs-property\">length\u003C/span>) {\n            loadMoreButton.\u003Cspan class=\"hljs-property\">style\u003C/span>.\u003Cspan class=\"hljs-property\">display\u003C/span> = \u003Cspan class=\"hljs-string\">&#x27;none&#x27;\u003C/span>;\n        } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n            loadMoreButton.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = \u003Cspan class=\"hljs-string\">`Load More Lines (\u003Cspan class=\"hljs-subst\">${allLines.length - visibleCount}\u003C/span> remaining)`\u003C/span>;\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">handleWorkerMessage\u003C/span>(\u003Cspan class=\"hljs-params\">data\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> { id, highlighted, success, error } = data;\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (success) {\n            \u003Cspan class=\"hljs-keyword\">const\u003C/span> block = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">querySelector\u003C/span>(\u003Cspan class=\"hljs-string\">`[data-highlight-id=&quot;\u003Cspan class=\"hljs-subst\">${id}\u003C/span>&quot;]`\u003C/span>);\n            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (block) {\n                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">applyHighlighting\u003C/span>(block, highlighted);\n            }\n        } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n            \u003Cspan class=\"hljs-variable language_\">console\u003C/span>.\u003Cspan class=\"hljs-title function_\">warn\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;Worker highlighting failed:&#x27;\u003C/span>, error);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">applyHighlighting\u003C/span>(\u003Cspan class=\"hljs-params\">element, highlighted\u003C/span>) {\n        \u003Cspan class=\"hljs-comment\">// Use requestIdleCallback for better performance\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-string\">&#x27;requestIdleCallback&#x27;\u003C/span> \u003Cspan class=\"hljs-keyword\">in\u003C/span> \u003Cspan class=\"hljs-variable language_\">window\u003C/span>) {\n            \u003Cspan class=\"hljs-title function_\">requestIdleCallback\u003C/span>(\u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n                element.\u003Cspan class=\"hljs-property\">innerHTML\u003C/span> = highlighted;\n            });\n        } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n            \u003Cspan class=\"hljs-comment\">// Fallback for browsers without requestIdleCallback\u003C/span>\n            \u003Cspan class=\"hljs-built_in\">setTimeout\u003C/span>(\u003Cspan class=\"hljs-function\">() =&gt;\u003C/span> {\n                element.\u003Cspan class=\"hljs-property\">innerHTML\u003C/span> = highlighted;\n            }, \u003Cspan class=\"hljs-number\">0\u003C/span>);\n        }\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">extractLanguage\u003C/span>(\u003Cspan class=\"hljs-params\">element\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> className = element.\u003Cspan class=\"hljs-property\">className\u003C/span>;\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> match = className.\u003Cspan class=\"hljs-title function_\">match\u003C/span>(\u003Cspan class=\"hljs-regexp\">/language-([a-zA-Z0-9-]+)/\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> match ? match[\u003Cspan class=\"hljs-number\">1\u003C/span>] : \u003Cspan class=\"hljs-string\">&#x27;markup&#x27;\u003C/span>;\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">generateId\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> \u003Cspan class=\"hljs-title class_\">Math\u003C/span>.\u003Cspan class=\"hljs-title function_\">random\u003C/span>().\u003Cspan class=\"hljs-title function_\">toString\u003C/span>(\u003Cspan class=\"hljs-number\">36\u003C/span>).\u003Cspan class=\"hljs-title function_\">substring\u003C/span>(\u003Cspan class=\"hljs-number\">2\u003C/span>, \u003Cspan class=\"hljs-number\">15\u003C/span>);\n    }\n    \n    \u003Cspan class=\"hljs-title function_\">bindEvents\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-comment\">// Handle dynamically added code blocks\u003C/span>\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> observer = \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">MutationObserver\u003C/span>(\u003Cspan class=\"hljs-function\">(\u003Cspan class=\"hljs-params\">mutations\u003C/span>) =&gt;\u003C/span> {\n            mutations.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">mutation\u003C/span> =&gt;\u003C/span> {\n                mutation.\u003Cspan class=\"hljs-property\">addedNodes\u003C/span>.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">node\u003C/span> =&gt;\u003C/span> {\n                    \u003Cspan class=\"hljs-keyword\">if\u003C/span> (node.\u003Cspan class=\"hljs-property\">nodeType\u003C/span> === \u003Cspan class=\"hljs-number\">1\u003C/span>) {\n                        \u003Cspan class=\"hljs-keyword\">const\u003C/span> codeBlocks = node.\u003Cspan class=\"hljs-title function_\">querySelectorAll\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;pre[class*=&quot;language-&quot;], code[class*=&quot;language-&quot;]&#x27;\u003C/span>);\n                        codeBlocks.\u003Cspan class=\"hljs-title function_\">forEach\u003C/span>(\u003Cspan class=\"hljs-function\">\u003Cspan class=\"hljs-params\">block\u003C/span> =&gt;\u003C/span> {\n                            \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span>) {\n                                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span>.\u003Cspan class=\"hljs-title function_\">observe\u003C/span>(block);\n                            } \u003Cspan class=\"hljs-keyword\">else\u003C/span> {\n                                \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-title function_\">highlightBlock\u003C/span>(block);\n                            }\n                        });\n                    }\n                });\n            });\n        });\n        \n        observer.\u003Cspan class=\"hljs-title function_\">observe\u003C/span>(\u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">body\u003C/span>, {\n            \u003Cspan class=\"hljs-attr\">childList\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n            \u003Cspan class=\"hljs-attr\">subtree\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>\n        });\n    }\n    \n    \u003Cspan class=\"hljs-comment\">// Performance monitoring\u003C/span>\n    \u003Cspan class=\"hljs-title function_\">measurePerformance\u003C/span>(\u003Cspan class=\"hljs-params\">operation, callback\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> start = performance.\u003Cspan class=\"hljs-title function_\">now\u003C/span>();\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> result = \u003Cspan class=\"hljs-title function_\">callback\u003C/span>();\n        \u003Cspan class=\"hljs-keyword\">const\u003C/span> end = performance.\u003Cspan class=\"hljs-title function_\">now\u003C/span>();\n        \n        \u003Cspan class=\"hljs-variable language_\">console\u003C/span>.\u003Cspan class=\"hljs-title function_\">log\u003C/span>(\u003Cspan class=\"hljs-string\">`\u003Cspan class=\"hljs-subst\">${operation}\u003C/span>: \u003Cspan class=\"hljs-subst\">${(end - start).toFixed(\u003Cspan class=\"hljs-number\">2\u003C/span>)}\u003C/span>ms`\u003C/span>);\n        \u003Cspan class=\"hljs-keyword\">return\u003C/span> result;\n    }\n    \n    \u003Cspan class=\"hljs-comment\">// Cleanup\u003C/span>\n    \u003Cspan class=\"hljs-title function_\">destroy\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span>) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">observer\u003C/span>.\u003Cspan class=\"hljs-title function_\">disconnect\u003C/span>();\n        }\n        \n        \u003Cspan class=\"hljs-keyword\">if\u003C/span> (\u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span>) {\n            \u003Cspan class=\"hljs-variable language_\">this\u003C/span>.\u003Cspan class=\"hljs-property\">worker\u003C/span>.\u003Cspan class=\"hljs-title function_\">terminate\u003C/span>();\n        }\n    }\n}\n\n\u003Cspan class=\"hljs-comment\">// Performance monitoring styles\u003C/span>\n\u003Cspan class=\"hljs-keyword\">const\u003C/span> performanceStyles = \u003Cspan class=\"hljs-string\">`\n.virtual-code-container {\n    position: relative;\n    max-height: 500px;\n    overflow: hidden;\n    border: 1px solid #e1e4e8;\n    border-radius: 6px;\n}\n\n.load-more-code {\n    width: 100%;\n    padding: 12px;\n    background: #f6f8fa;\n    border: none;\n    border-top: 1px solid #e1e4e8;\n    color: #24292e;\n    cursor: pointer;\n    font-size: 14px;\n    font-weight: 500;\n    transition: background-color 0.2s ease;\n}\n\n.load-more-code:hover {\n    background: #e1e4e8;\n}\n\n.load-more-code:focus {\n    outline: 2px solid #007bff;\n    outline-offset: -2px;\n}\n\n.code-performance-indicator {\n    position: absolute;\n    top: 8px;\n    left: 8px;\n    background: rgba(0,0,0,0.7);\n    color: white;\n    padding: 4px 8px;\n    border-radius: 4px;\n    font-size: 11px;\n    font-family: monospace;\n    opacity: 0.7;\n    pointer-events: none;\n}\n\n/* Loading states */\n.code-loading {\n    position: relative;\n    opacity: 0.6;\n}\n\n.code-loading::after {\n    content: &#x27;Highlighting...&#x27;;\n    position: absolute;\n    top: 8px;\n    right: 8px;\n    background: rgba(0,0,0,0.7);\n    color: white;\n    padding: 4px 8px;\n    border-radius: 4px;\n    font-size: 11px;\n    z-index: 10;\n}\n\n/* Reduced motion support */\n@media (prefers-reduced-motion: reduce) {\n    .code-loading,\n    .load-more-code {\n        transition: none;\n    }\n}\n`\u003C/span>;\n\n\u003Cspan class=\"hljs-comment\">// Inject performance styles\u003C/span>\n\u003Cspan class=\"hljs-keyword\">const\u003C/span> perfStyle = \u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">createElement\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;style&#x27;\u003C/span>);\nperfStyle.\u003Cspan class=\"hljs-property\">textContent\u003C/span> = performanceStyles;\n\u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-property\">head\u003C/span>.\u003Cspan class=\"hljs-title function_\">appendChild\u003C/span>(perfStyle);\n\n\u003Cspan class=\"hljs-comment\">// Initialize lazy highlighting\u003C/span>\n\u003Cspan class=\"hljs-variable language_\">document\u003C/span>.\u003Cspan class=\"hljs-title function_\">addEventListener\u003C/span>(\u003Cspan class=\"hljs-string\">&#x27;DOMContentLoaded&#x27;\u003C/span>, \u003Cspan class=\"hljs-keyword\">function\u003C/span>(\u003Cspan class=\"hljs-params\">\u003C/span>) {\n    \u003Cspan class=\"hljs-keyword\">new\u003C/span> \u003Cspan class=\"hljs-title class_\">LazySyntaxHighlighter\u003C/span>({\n        \u003Cspan class=\"hljs-attr\">enableVirtualization\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">enableWorker\u003C/span>: \u003Cspan class=\"hljs-literal\">true\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">threshold\u003C/span>: \u003Cspan class=\"hljs-number\">0.1\u003C/span>,\n        \u003Cspan class=\"hljs-attr\">rootMargin\u003C/span>: \u003Cspan class=\"hljs-string\">&#x27;100px&#x27;\u003C/span>\n    });\n});\n\u003C/code>\u003C/pre>\u003Ch2 id=\"conclusion\">Conclusion\u003C/h2>\n\u003Cp>Advanced Markdown code syntax highlighting represents a fundamental component of modern technical documentation that significantly enhances code readability, user engagement, and knowledge transfer effectiveness. By implementing comprehensive highlighting systems, custom theme development, and interactive code examples, technical writers can create documentation experiences that effectively communicate complex programming concepts while maintaining accessibility and performance standards.\u003C/p>\n\u003Cp>The key to successful syntax highlighting implementation lies in balancing visual enhancement with practical functionality, ensuring that highlighting systems improve rather than complicate the documentation experience. Whether you&#39;re building API documentation, programming tutorials, or technical specifications, the techniques covered in this guide provide the foundation for creating professional-grade code presentation that serves both novice and expert developers.\u003C/p>\n\u003Cp>Remember to implement highlighting progressively, prioritize accessibility across all themes, and optimize performance for large codebases. With proper advanced syntax highlighting implementation, your Markdown documentation becomes a powerful platform for technical communication that engages readers while effectively conveying complex programming information through visually rich, interactive code examples.\u003C/p>\n",[15,19,22,25,28],{"id":16,"text":17,"level":18},"why-implement-advanced-syntax-highlighting","Why Implement Advanced Syntax Highlighting?",2,{"id":20,"text":21,"level":18},"foundation-syntax-highlighting-systems","Foundation Syntax Highlighting Systems",{"id":23,"text":24,"level":18},"integration-with-documentation-systems","Integration with Documentation Systems",{"id":26,"text":27,"level":18},"performance-optimization-and-best-practices","Performance Optimization and Best Practices",{"id":29,"text":30,"level":18},"conclusion","Conclusion",[],[33,41,49],{"slug":34,"title":35,"description":36,"excerpt":37,"date":38,"category":9,"author":10,"keywords":39,"readingMinutes":40},"markdown-code-block-syntax-highlighting-language-specification-complete-guide","Markdown Code Block Syntax Highlighting and Language Specification: Complete Guide to Enhanced Code Display and Documentation","Master advanced Markdown code block syntax highlighting, language specification, and enhanced code display for technical documentation. Learn highlighting techniques, language identifiers, and code presentation best practices.","Advanced Markdown code block syntax highlighting and language specification enable sophisticated technical documentation that provides clear, readable code examples with proper syntax coloring,…","2025-12-11","markdown code blocks, syntax highlighting markdown, code block languages, markdown code syntax, programming language markdown, code highlighting, fenced code blocks, markdown code display",22,{"slug":42,"title":43,"description":44,"excerpt":45,"date":46,"category":9,"author":10,"keywords":47,"readingMinutes":48},"markdown-code-highlighting-syntax-complete-guide","Markdown Code Highlighting and Syntax Features: Complete Guide for Enhanced Technical Documentation","Master advanced Markdown code highlighting techniques with syntax specification, language detection, custom themes, and interactive code features. Learn professional code presentation for documentation, tutorials, and technical writing.","Advanced Markdown code highlighting transforms technical documentation by providing visually distinct, language-specific syntax coloring and enhanced readability for code examples across…","2025-10-04","markdown code highlighting, syntax highlighting markdown, code blocks markdown, programming language syntax, markdown code themes, technical documentation, markdown code examples, syntax highlighting themes",24,{"slug":50,"title":51,"description":52,"excerpt":53,"date":54,"category":9,"author":10,"keywords":55,"readingMinutes":56},"markdown-syntax-highlighting-complete-guide","Markdown Syntax Highlighting: Complete Guide for Code Blocks","Master syntax highlighting in Markdown code blocks across platforms. Learn language identifiers, custom highlighting, and platform-specific features for better code presentation.","Code blocks are one of Markdown's most powerful features for technical writing, and syntax highlighting transforms plain code into readable, professionally formatted content. Understanding how to…","2025-08-18","markdown syntax highlighting, markdown code blocks, language highlighting, code formatting markdown, syntax coloring markdown, programming language markdown",8,1792184946002]