(root: Element)
| 162 | } |
| 163 | |
| 164 | function disposeCopyButtons(root: Element) { |
| 165 | const hosts = [ |
| 166 | ...(root instanceof HTMLElement && root.getAttribute("data-slot") === "markdown-copy-button" ? [root] : []), |
| 167 | ...Array.from(root.querySelectorAll('[data-slot="markdown-copy-button"]')).filter( |
| 168 | (el): el is HTMLElement => el instanceof HTMLElement, |
| 169 | ), |
| 170 | ] |
| 171 | hosts.forEach(disposeCopyButton) |
| 172 | } |
| 173 | |
| 174 | const shellLanguages = new Set(["bash", "sh", "shell", "zsh", "fish", "console", "terminal"]) |
| 175 |
no test coverage detected