Fix code block buttons not rendering - correct duplicate detection class name
This commit is contained in:
parent
5426425e3a
commit
0dcf1eb6e7
1 changed files with 2 additions and 2 deletions
|
|
@ -97,8 +97,8 @@ function addCodeBlockCopyButtons(element) {
|
|||
codeBlocks.forEach((codeBlock) => {
|
||||
const pre = codeBlock.parentElement;
|
||||
if (pre.tagName.toLowerCase() === "pre") {
|
||||
// Check if copy button already exists to avoid duplicates
|
||||
if (pre.querySelector('.code-copy-btn')) {
|
||||
// Check if buttons already exist to avoid duplicates
|
||||
if (pre.querySelector('.uncloseai-code-copy-btn')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue