mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-31 00:47:13 +00:00
highlight: make copy of selection work with noClasses=true #991
This commit is contained in:
parent
8dad5ee419
commit
93b32c1672
3 changed files with 4 additions and 3 deletions
|
@ -1002,7 +1002,8 @@ div.highlight > div td {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* disable selection for lineno cells */
|
/* disable selection for lineno cells */
|
||||||
div.highlight > div td:first-child:not(:last-child) {
|
div.highlight > div td:first-child:not(:last-child),
|
||||||
|
div.highlight > span[id] {
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
7.3.1+80e448e5bdaa92c87ee0d0d86f1125c8606ebf5f
|
7.3.1+8dad5ee419e5bb2a0b380aa72d7a7389af4945f6
|
|
@ -614,7 +614,7 @@ function initCodeClipboard() {
|
||||||
for (var i = 0; i < selection.rangeCount; i++) {
|
for (var i = 0; i < selection.rangeCount; i++) {
|
||||||
var range = selection.getRangeAt(i);
|
var range = selection.getRangeAt(i);
|
||||||
var fragment = range.cloneContents();
|
var fragment = range.cloneContents();
|
||||||
if (fragment.querySelector('.ln')) {
|
if (fragment.querySelector('.ln') || fragment.querySelector('[id]')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue