Skip to content

Commit c43e27b

Browse files
revealjs x renderings x brand-mode
previously revealjs went to the html path but didn't have the css so both renderings were displayed now revealjs does brand-mode the same as typst
1 parent 7c8fd21 commit c43e27b

File tree

4 files changed

+1649
-1519
lines changed

4 files changed

+1649
-1519
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ function choose_cell_renderings()
4444
local lightDiv = outputs['light']
4545
local darkDiv = outputs['dark']
4646
local blocks = pandoc.Blocks({table.unpack(div.content, 1, firstCODIndex - 1)})
47-
if quarto.format.isHtmlOutput() and lightDiv and darkDiv then
48-
blocks:insert(pandoc.Div(lightDiv.content, pandoc.Attr("", {'light-content'}, {})))
49-
blocks:insert(pandoc.Div(darkDiv.content, pandoc.Attr("", {'dark-content'}, {})))
50-
elseif quarto.format.isTypstOutput() and lightDiv and darkDiv then
47+
if (quarto.format.isTypstOutput() or quarto.format.isRevealJsOutput()) and lightDiv and darkDiv then
5148
local brandMode = param('brand-mode') or 'light'
5249
if brandMode == 'light' then
5350
blocks:insert(lightDiv)
5451
elseif brandMode == 'dark' then
5552
blocks:insert(darkDiv)
5653
end
54+
elseif quarto.format.isHtmlOutput() and lightDiv and darkDiv then
55+
blocks:insert(pandoc.Div(lightDiv.content, pandoc.Attr("", {'light-content'}, {})))
56+
blocks:insert(pandoc.Div(darkDiv.content, pandoc.Attr("", {'dark-content'}, {})))
5757
else
5858
blocks:insert(lightDiv or darkDiv)
5959
end

0 commit comments

Comments
 (0)