Skip to content

Commit eef49ea

Browse files
committed
escape computation in demo block and remove keep-md
1 parent cfc1cb9 commit eef49ea

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

vignettes/dynamic-metadata.qmd

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ format:
44
html:
55
toc: true
66
toc-depth: 3
7-
keep-md: true
87
vignette: >
98
%\VignetteIndexEntry{Dynamic Metadata in Quarto Documents}
109
%\VignetteEngine{quarto::html}
@@ -106,25 +105,25 @@ email-preview: true
106105

107106
Pick variant
108107

109-
```{r}
108+
```{{r}}
110109
variant <- sample(1:3, 1)
111110
```
112111

113-
```{r}
112+
```{{r}}
114113
#| echo: false
115114
#| output: asis
116115
quarto::write_yaml_metadata_block(.list = setNames(list(TRUE), sprintf("is_email_variant_%d", variant)))
117116
```
118117

119118
::: {.email}
120119

121-
This email was sent from Quarto! With conditional output for condition `r variant`
120+
This email was sent from Quarto! With conditional output for condition `{{r}} variant`
122121

123122
::: {.content-visible when-meta="is_email_variant_1"}
124123

125124
email body 1
126125

127-
```{r}
126+
```{{r}}
128127
head(mtcars)
129128
```
130129

@@ -138,7 +137,7 @@ subject 1
138137

139138
email body 2
140139

141-
```{r}
140+
```{{r}}
142141
head(palmerpenguins::penguins)
143142
```
144143

@@ -152,7 +151,7 @@ subject 2
152151

153152
email body 3
154153

155-
```{r}
154+
```{{r}}
156155
praise::praise()
157156
```
158157

@@ -170,9 +169,9 @@ TRUE
170169

171170
## Logging
172171

173-
Case: `r variant`
172+
Case: `{{r}} variant`
174173

175-
Report run: `r Sys.time()`
174+
Report run: `{{r}} Sys.time()`
176175
````
177176

178177
This example demonstrates several advanced concepts:

0 commit comments

Comments
 (0)