File tree Expand file tree Collapse file tree 4 files changed +40
-2
lines changed
src/resources/filters/quarto-pre
docs/smoke-all/2025/07/23 Expand file tree Collapse file tree 4 files changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ function contents_shortcode_filter()
104104 -- if we have a span, return it wrapped in a div
105105 return pandoc .Div (pandoc .Plain ({span }))
106106 end
107- warn (
107+ quarto . log . warning (
108108 " [Malformed document] Found `contents` shortcode without a corresponding div with id: " .. tostring (data ) .. " .\n " ..
109109 " This might happen because the shortcode is used in div context, while the id corresponds to a span.\n " ..
110110 " Removing from document." )
Original file line number Diff line number Diff line change 1+ ---
2+ format : typst
3+ title : Another section
4+ _quarto :
5+ tests :
6+ typst :
7+ noErrorsOrWarnings : true
8+ ---
9+
10+ ## A section
11+
12+ Here we define a plot.
13+
14+ ::: {.cell execution_count=1}
15+
16+ ::: {.cell-output .cell-output-display}
17+ ` code ` {#a-cell}
18+ :::
19+ :::
20+
21+
22+
23+ Here we use the plot, inside a callout:
24+
25+
26+ ::: callout-note
27+
28+ ## Note the following plot
29+
30+ {{< contents a-cell >}}
31+
32+ :::
33+
34+
Original file line number Diff line number Diff line change @@ -180,6 +180,9 @@ function resolveTestSpecs(
180180 } else if ( key === "noErrors" ) {
181181 checkWarnings = false ;
182182 verifyFns . push ( noErrors ) ;
183+ } if ( key === "noErrorsOrWarnings" ) {
184+ checkWarnings = false ;
185+ verifyFns . push ( noErrorsOrWarnings ) ;
183186 } else {
184187 // See if there is a project and grab it's type
185188 const projectPath = findRootTestsProjectDir ( input )
Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ export const noErrorsOrWarnings: Verify = {
152152 verify : ( outputs : ExecuteOutput [ ] ) => {
153153 const isErrorOrWarning = ( output : ExecuteOutput ) => {
154154 return output . levelName . toLowerCase ( ) === "warn" ||
155- output . levelName . toLowerCase ( ) === "error" ;
155+ output . levelName . toLowerCase ( ) === "error" ||
156+ output . msg . startsWith ( "(W)" ) ; // this is a warning from quarto.log.warning()
156157 } ;
157158
158159 const errorsOrWarnings = outputs . some ( isErrorOrWarning ) ;
You can’t perform that action at this time.
0 commit comments