File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 172172 .markdown .code-copy-btn {
173173 position : absolute; top : 0.75rem ; right : 0.75rem ;
174174 display : inline-flex; align-items : center; justify-content : center;
175- min-width : 5.5 rem ; padding : 0.4rem 0.75rem ;
175+ min-width : max-content ; padding : 0.4rem 0.75rem ;
176176 border : 1px solid var (--border-color ); border-radius : 999px ;
177177 background : var (--bg-overlay ); color : var (--text-secondary );
178178 font : inherit; font-size : 0.8rem ; cursor : pointer; transition : all 0.2s ease;
Original file line number Diff line number Diff line change 223223 if ( ! container ) return ;
224224 const codeBlocks = container . querySelectorAll ( 'pre' ) ;
225225
226- codeBlocks . forEach ( ( pre , index ) => {
226+ codeBlocks . forEach ( ( pre ) => {
227227 const code = pre . querySelector ( 'code' ) ;
228228 const codeText = code ?. textContent ?. trim ( ) ;
229229 if ( ! codeText ) return ;
232232 copyButton . type = 'button' ;
233233 copyButton . className = 'code-copy-btn' ;
234234 copyButton . textContent = 'Copy' ;
235- copyButton . setAttribute ( 'aria-label' , ` Copy code block ${ index + 1 } ` ) ;
235+ copyButton . setAttribute ( 'aria-label' , ' Copy code' ) ;
236236
237237 const liveRegion = document . createElement ( 'span' ) ;
238238 liveRegion . className = 'sr-only' ;
You can’t perform that action at this time.
0 commit comments