Skip to content

Commit 1959747

Browse files
authored
Merge pull request #11436 from quarto-dev/bugfix/11401
Hide internal TODO notes in EJS templates
2 parents 1421d2e + 0c81651 commit 1959747

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

news/changelog-1.6.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ All changes included in 1.6:
3838
- ([#10761](https://github.com/quarto-dev/quarto-cli/issues/10761)): Add support for `licence: CC0` to automatically link to Creative Commons licence [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/).
3939
- ([#10817](https://github.com/quarto-dev/quarto-cli/issues/10817)): Ensure that user provided SCSS has precedent over quarto generated scss also for dark theme.
4040
- ([#11124](https://github.com/quarto-dev/quarto-cli/pull/11124)): Use stable order of GLightbox options
41+
- ([#11401](https://github.com/quarto-dev/quarto-cli/issues/11401)): Use EJS comment syntax to hide internal TODO notes from the output.
4142

4243
## `revealjs` Format
4344

src/resources/formats/html/templates/quarto-html.ejs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,10 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
283283
284284
285285
if (window.document.getElementById('quarto-embedded-source-code-modal')) {
286+
<% /* %>
286287
// For code content inside modals, clipBoardJS needs to be initialized with a container option
287288
// TODO: Check when it could be a function (https://github.com/zenorocha/clipboard.js/issues/860)
289+
<% */ %>
288290
const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
289291
text: getTextToCopy,
290292
container: window.document.getElementById('quarto-embedded-source-code-modal')
@@ -507,7 +509,9 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
507509
if (window.Quarto?.typesetMath) {
508510
window.Quarto.typesetMath(note);
509511
}
512+
<% /* %>
510513
// TODO in 1.5, we should make sure this works without a callout special case
514+
<% */ %>
511515
if (note.classList.contains("callout")) {
512516
return note.outerHTML;
513517
} else {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
format: html
3+
_quarto:
4+
tests:
5+
html:
6+
ensureFileRegexMatches:
7+
- []
8+
- ["TODO"]
9+
---
10+
11+
## Hello, world

0 commit comments

Comments
 (0)