Commit 21cef6a
fix(docs): Copy button now copies only visible text in terminal blocks
The copy button in package manager tabs was copying all commands (npm,
pnpm, bun) instead of just the selected one. Changed getVisibleText to
recursively walk the DOM and skip elements with display: none.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 58b6ae6 commit 21cef6a
1 file changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
| |||
0 commit comments