Skip to content

Commit 5b4f1c7

Browse files
committed
🐛 Fix: Correct validation for revelajs and jupyter notebooks
1 parent 28202ca commit 5b4f1c7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/vuegen/quarto_reportview.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,15 @@ def run_report(self, output_dir: str = BASE_DIR) -> None:
210210
args,
211211
check=True,
212212
)
213-
out_path = file_path_to_qmd.with_suffix(f".{self.report_type.lower()}")
214-
if self.report_type in [r.ReportType.REVEALJS, r.ReportType.JUPYTER]:
215-
out_path = file_path_to_qmd.with_suffix(".html")
213+
if self.report_type == r.ReportType.REVEALJS:
214+
out_path = file_path_to_qmd.with_name(f"{file_path_to_qmd.stem}_revealjs.html")
215+
elif self.report_type == r.ReportType.JUPYTER:
216+
out_path = file_path_to_qmd.with_suffix(".ipynb")
217+
else:
218+
out_path = file_path_to_qmd.with_suffix(f".{self.report_type.lower()}")
216219
if not out_path.exists():
217220
raise FileNotFoundError(f"Report file could not be created: {out_path}")
221+
218222
if self.report_type == r.ReportType.JUPYTER:
219223
args = [self.quarto_path, "convert", str(file_path_to_qmd)]
220224
subprocess.run(

0 commit comments

Comments
 (0)