mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
[theme] cleanup distration #813
This commit is contained in:
parent
195de35cfb
commit
a3c4d72125
1 changed files with 3 additions and 3 deletions
|
@ -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' ) ) ){
|
||||
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue