Skip to content

Commit 4543d5e

Browse files
committed
fix(appendix): wrap BibTeX block in code-copy-outer-scaffold
In 1.8 the CSS copy-button hover selector was changed to require a div.code-copy-outer-scaffold parent. Regular code blocks were updated but the citation appendix template was not, making the copy button invisible. Wrap the bibtex <pre> in the scaffold div to match.
1 parent 87b266f commit 4543d5e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/format/html/format-html-appendix.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,14 @@ export async function processDocumentAppendix(
304304

305305
const bibTexDiv = createCodeBlock(doc, cite.bibtex, "bibtex");
306306
bibTexDiv.classList.add(kQuartoCiteBibtexClass);
307-
contentsDiv.appendChild(bibTexDiv);
307+
308+
const outerScaffold = doc.createElement("div");
309+
outerScaffold.classList.add("code-copy-outer-scaffold");
310+
outerScaffold.appendChild(bibTexDiv);
311+
contentsDiv.appendChild(outerScaffold);
308312

309313
const copyButton = createCodeCopyButton(doc, format);
310-
bibTexDiv.appendChild(copyButton);
314+
outerScaffold.appendChild(copyButton);
311315
}
312316

313317
if (cite?.html) {

0 commit comments

Comments
 (0)