From 2c0db6e38aefe538479cd283661898d6505ba8b4 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Sun, 11 Feb 2024 07:29:14 +0000 Subject: [PATCH] Add check for HTML format. --- _extensions/embedio/pdf.lua | 4 ++++ _extensions/embedio/revealjs.lua | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/_extensions/embedio/pdf.lua b/_extensions/embedio/pdf.lua index e5932e3..cc4a7b3 100644 --- a/_extensions/embedio/pdf.lua +++ b/_extensions/embedio/pdf.lua @@ -1,5 +1,9 @@ local function pdf(args, kwargs, meta) + if not quarto.doc.is_format("html") then + return + end + -- Supported options for now local pdf_file_name = pandoc.utils.stringify(kwargs["file"]) local height = pandoc.utils.stringify(kwargs["height"]) or "600px" diff --git a/_extensions/embedio/revealjs.lua b/_extensions/embedio/revealjs.lua index 42ed162..094bbea 100644 --- a/_extensions/embedio/revealjs.lua +++ b/_extensions/embedio/revealjs.lua @@ -25,6 +25,11 @@ local function ensureSlideCSSPresent() end local function revealjs(args, kwargs, meta , raw_args) + + if not quarto.doc.is_format("html") then + return + end + -- Enable CSS ensureSlideCSSPresent()