Commit f464fe6
committed
docs: fix line breaks when copying commands from website
The MkDocs Material theme's anchor_linenums feature injects
<a id="__codelineno-*"> elements inside code line spans. Firefox on
Linux treats these as DOM selection boundaries, inserting line breaks
when users copy code from the documentation.
Fix by using display:contents on the anchor elements to remove them
from the rendering tree and user-select:none to exclude them from
copy selection. Also force display:inline on token-level spans.
Fixes: #482
Signed-off-by: Git-HimanshuRathi <himanshurathiwork@gmail.com>1 parent 1946259 commit f464fe6
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
| |||
0 commit comments