Skip to content

Use system temp directory for rendered HTML temp file - #9

Open
xrmb wants to merge 1 commit into
FrankEBailey:mainfrom
xrmb:fix-temp-file-location
Open

Use system temp directory for rendered HTML temp file#9
xrmb wants to merge 1 commit into
FrankEBailey:mainfrom
xrmb:fix-temp-file-location

Conversation

@xrmb

@xrmb xrmb commented Jul 5, 2026

Copy link
Copy Markdown

Summary

  • Changed
    avigate_to_html in mdview.c to create the intermediate HTML temp file in the system temp directory instead of next to the source markdown file.
  • Added a tag pointing back at the markdown directory so relative local images and links keep resolving correctly.
  • Added est_local.png and a local image test to est.md to verify the fix.
  • Updated README.md to describe the new behavior.

Test plan

  • Build 32-bit mdview.wlx`
  • Build 64-bit mdview.wlx64`
  • Open test.md in MDView and confirm test_local.png renders
  • Confirm the temp HTML file is created in the system temp directory, not next to the markdown file

Previously MDView wrote the intermediate HTML file next to the source .md
file, cluttering the markdown directory. Now it uses the system temp
directory and injects a <base> tag so relative local images and links
still resolve against the markdown directory.

Adds test_local.png and a local image test section to test.md to verify
local image loading still works with the temp file moved away from the
source directory.

Updates README.md to describe the new behavior.
@xrmb
xrmb force-pushed the fix-temp-file-location branch from 080249c to 0cc9b10 Compare July 5, 2026 04:03
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.

1 participant