Skip to content

Commit

Permalink
[theme] cleanup distration #813
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Mar 18, 2024
1 parent 195de35 commit a3c4d72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,12 @@ function initCodeClipboard(){
});
if( inTable ){
var table = code.parentNode.parentNode.parentNode.parentNode.parentNode;
table.dataset[ 'code' ] = text;
table.dataset.code = text;
table.parentNode.insertBefore( button, table.nextSibling );
}
else if( inPre ){
var pre = code.parentNode;
pre.dataset[ 'code' ] = text;
pre.dataset.code = text;
var p = pre.parentNode;
// indented code blocks are missing the div
while( p != document && ( p.tagName.toLowerCase() != 'div' || !p.classList.contains( 'highlight' ) ) ){
Expand All @@ -656,7 +656,7 @@ function initCodeClipboard(){
pre.parentNode.insertBefore( button, pre.nextSibling );
}
else{
code.dataset[ 'code' ] = text;
code.dataset.code = text;
code.parentNode.insertBefore( button, code.nextSibling );
}
}
Expand Down

0 comments on commit a3c4d72

Please sign in to comment.