mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +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 ){
|
if( inTable ){
|
||||||
var table = code.parentNode.parentNode.parentNode.parentNode.parentNode;
|
var table = code.parentNode.parentNode.parentNode.parentNode.parentNode;
|
||||||
table.dataset[ 'code' ] = text;
|
table.dataset.code = text;
|
||||||
table.parentNode.insertBefore( button, table.nextSibling );
|
table.parentNode.insertBefore( button, table.nextSibling );
|
||||||
}
|
}
|
||||||
else if( inPre ){
|
else if( inPre ){
|
||||||
var pre = code.parentNode;
|
var pre = code.parentNode;
|
||||||
pre.dataset[ 'code' ] = text;
|
pre.dataset.code = text;
|
||||||
var p = pre.parentNode;
|
var p = pre.parentNode;
|
||||||
// indented code blocks are missing the div
|
// indented code blocks are missing the div
|
||||||
while( p != document && ( p.tagName.toLowerCase() != 'div' || !p.classList.contains( 'highlight' ) ) ){
|
while( p != document && ( p.tagName.toLowerCase() != 'div' || !p.classList.contains( 'highlight' ) ) ){
|
||||||
|
@ -656,7 +656,7 @@ function initCodeClipboard(){
|
||||||
pre.parentNode.insertBefore( button, pre.nextSibling );
|
pre.parentNode.insertBefore( button, pre.nextSibling );
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
code.dataset[ 'code' ] = text;
|
code.dataset.code = text;
|
||||||
code.parentNode.insertBefore( button, code.nextSibling );
|
code.parentNode.insertBefore( button, code.nextSibling );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue