You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 210691f
Browse filesBrowse the repository at this point in the historyBrowse files
Respect code-copy for the citation BibTeX copy button (#15209)
With `code-copy: false`, the BibTeX block in the citation appendix still
got a copy button, but clicking it did nothing: clipboard.js and its
setup script are not emitted when code copy is off. #14387 moved the
button inside the block, which made the dead button easier to notice.
The appendix now adds the scaffold, the code-with-copy class and the
button only when code copy is enabled, using the same resolution as the
other code blocks. That resolution moves to formatHasCodeCopy() in
format-html-shared.ts, next to htmlFormatFeatureDefaults(), so the
minimal default stays in one place. The appendix cannot import
format-html.ts without an import cycle, since that module imports the
bootstrap postprocessor, which calls the appendix.
- Gate the BibTeX copy button and its scaffold on code-copy
- Resolve code-copy in one shared helper, not inline in format-html.ts
- Stop createCodeBlock from always adding code-with-copy
Fixes#15207
Copy file name to clipboardExpand all lines: news/changelog-1.11.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,7 @@ All changes included in 1.11:
81
81
- ([#15125](https://github.com/quarto-dev/quarto-cli/pull/15125)): Fix Google Scholar metadata failing the render with a CSL JSON (`.json`) bibliography.
82
82
- ([#15128](https://github.com/quarto-dev/quarto-cli/pull/15128)): Fix Google Scholar metadata missing references with a YAML bibliography not wrapped in `---` delimiters.
83
83
- ([#15131](https://github.com/quarto-dev/quarto-cli/issues/15131)): Fix the light/dark toggle appearing, with no dark styles to switch to, when the `dark` brand file holds only comments and is ignored.
84
+
- ([#15207](https://github.com/quarto-dev/quarto-cli/issues/15207)): Fix the BibTeX citation in the HTML appendix showing a copy button that does nothing when `code-copy: false` is set.
With `code-copy: false`, clipboard.js is not loaded, so a copy button on the BibTeX block in the citation appendix would do nothing. The BibTeX block is still rendered, but without the copy button or its scaffold, the same as other code blocks in the document (#15207).
0 commit comments