Skip to content

fix: preserve HTML when exporting report PDF - #715

Open
pcbeingused333 wants to merge 1 commit into
QuantConnect:masterfrom
pcbeingused333:fix/report-pdf-destination
Open

pcbeingused333 wants to merge 1 commit into
QuantConnect:masterfrom
pcbeingused333:fix/report-pdf-destination

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes #714

The PDF export uses a case-sensitive string replacement of .html. Uppercase or missing extensions therefore make the PDF copy overwrite the HTML; repeated .html segments also change more than the final suffix.

Use Path.with_suffix(".pdf") to derive the PDF filename. When the HTML destination already has a .pdf suffix (case-insensitive), append .pdf so both outputs remain separate, including on case-insensitive filesystems.

Tests

Parameterized CLI tests inspect both export commands for lowercase and uppercase HTML extensions, no extension, repeated .html segments, and lowercase/uppercase PDF destinations. The report test module had 5 failures and 58 passes before the fix, and 63 passes afterward. Docker is mocked; no full report-engine run was performed.

AI assistance was used to prepare this change and its tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report PDF export overwrites HTML for uppercase or missing .html extensions

1 participant