Skip to content

Commit eb7d8ca

Browse files
backslashes need to be doubled for windows image paths
1 parent ad6453a commit eb7d8ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/resources/filters/quarto-post/typst-brand-yaml.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ function render_typst_brand_yaml()
289289
if _quarto.modules.mediabag.should_mediabag(imageFilename) then
290290
imageFilename = _quarto.modules.mediabag.resolved_url_cache[logoOptions.path] or _quarto.modules.mediabag.fetch_and_store_image(logoOptions.path)
291291
imageFilename = _quarto.modules.mediabag.write_mediabag_entry(imageFilename) or imageFilename
292+
else
293+
-- backslashes need to be doubled for Windows
294+
imageFilename = string.gsub(imageFilename, '\\', '\\\\')
292295
end
293296
quarto.doc.include_text('in-header',
294297
'#set page(background: align(' .. logoOptions.location .. ', box(inset: ' .. inset .. ', image("' .. imageFilename .. '", width: ' .. logoOptions.width .. altProp .. '))))')

0 commit comments

Comments
 (0)