Skip to content

Commit 457ae8b

Browse files
committed
preview - don't set options as a const as it would be available in the global scope
1 parent 73805d3 commit 457ae8b

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

news/changelog-1.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,4 @@ All changes included in 1.7:
179179
- ([#12369](https://github.com/quarto-dev/quarto-cli/pull/12369)): `quarto preview` correctly throws a YAML validation error when a `format` key does not conform.
180180
- ([#12459](https://github.com/quarto-dev/quarto-cli/pull/12459)): Add `.page-inset-*` classes to completions.
181181
- ([#12492](https://github.com/quarto-dev/quarto-cli/pull/12492)): Improve shortcode extension template with new parameters and a link to docs.
182+
- ([#12513](https://github.com/quarto-dev/quarto-cli/issues/12513)): Fix an issue with `quarto preview` when using **DiagrammeR** R package for Graphiz diagram.
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
2-
<script>window.backupDefine = window.define; window.define = undefined;</script>
1+
<script>
2+
window.backupDefine = window.define;
3+
window.define = undefined;
4+
</script>
35
<script type="text/javascript" src="quarto-preview.js"></script>
4-
<script>window.define = window.backupDefine; window.backupDefine = undefined;</script>
6+
<script>
7+
window.define = window.backupDefine;
8+
window.backupDefine = undefined;
9+
</script>
510
<script type="text/javascript">
6-
const options = {
7-
origin: "<%- origin %>",
8-
search: "<%- search %>",
9-
inputFile: "<%- inputFile %>",
10-
isPresentation: <%= isPresentation %>
11-
}
1211
document.addEventListener("DOMContentLoaded", function () {
13-
window.QuartoPreview.init(options);
14-
});
12+
window.QuartoPreview.init({
13+
origin: "<%- origin %>",
14+
search: "<%- search %>",
15+
inputFile: "<%- inputFile %>",
16+
isPresentation: <%= isPresentation %>
17+
});
18+
})
1519
</script>

0 commit comments

Comments
 (0)