Skip to content

Commit db2f058

Browse files
revert document renderings
this feature is still a great idea but wasn't thought through needs access to the feature from engines/code what should happen with cells that don't have right number of outputs? (this would warn about them) will return to this in 1.8!
1 parent 6f7568b commit db2f058

File tree

4 files changed

+3
-157
lines changed

4 files changed

+3
-157
lines changed

src/resources/filters/normalize/flags.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,6 @@ function compute_flags()
195195
elseif lightbox_auto == false then
196196
flags.has_lightbox = false
197197
end
198-
if el.renderings then
199-
flags.has_renderings = true
200-
end
201198
end,
202199
}}
203200
end

src/resources/filters/quarto-post/cell-renderings.lua

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,15 @@ function choose_cell_renderings()
88
return {json}
99
end
1010
end
11-
12-
local documentRenderings
1311

1412
return {
15-
traverse = "topdown",
16-
Meta = function(meta)
17-
if meta.renderings then
18-
documentRenderings = {}
19-
for _, inlines in ipairs(meta.renderings) do
20-
table.insert(documentRenderings, inlines[1].text)
21-
end
22-
end
23-
end,
2413
Div = function(div)
2514
-- Only process cell div with renderings attr
26-
if not div.classes:includes("cell") or (not documentRenderings and not div.attributes["renderings"]) then
15+
if not div.classes:includes("cell") or not div.attributes["renderings"] then
2716
return nil
2817
end
29-
local renderings
30-
if div.attributes['renderings'] then
31-
local renderingsJson = div.attributes['renderings']
32-
renderings = jsonDecodeArray(renderingsJson)
33-
else
34-
renderings = documentRenderings
35-
end
18+
local renderingsJson = div.attributes['renderings']
19+
local renderings = jsonDecodeArray(renderingsJson)
3620
if not type(renderings) == "table" or #renderings == 0 then
3721
quarto.log.warning("renderings expected array of rendering names, got", renderings)
3822
return nil

src/resources/schema/document-options.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@
3434
description: The dark theme name, theme scss file, or a mix of both.
3535
description: Theme name, theme scss file, or a mix of both.
3636

37-
- name: renderings
38-
schema:
39-
arrayOf: string
40-
description: "Array of rendering names, e.g. `[light, dark]`"
41-
4237
- name: body-classes
4338
tags:
4439
formats: [$html-doc]

tests/docs/smoke-all/dark-mode/ggplot-duobrand-doc-renderings.qmd

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)