Skip to content

Conversation

@hkdeman
Copy link
Contributor

@hkdeman hkdeman commented Jul 24, 2025

Fixes issue where dory build was reverting changes to MDX files by deleting the user's docs folder.

Problem

The CLI build process was incorrectly deleting the user's docs folder at the start and end of the build, causing loss of MDX files and content.

Solution

  • Use temporary directory (.dory-build-temp) when user has existing docs folder
  • Preserve user's docs folder throughout the build process
  • Only clean up the temporary build directory, not user content

Fixes #54

Generated with Claude Code

The CLI build process was incorrectly deleting the user''s docs folder
at the start and end of the build, causing loss of MDX files and content.

Changes:
- Use temporary directory (.dory-build-temp) when user has existing docs folder
- Preserve user''s docs folder throughout the build process
- Only clean up the temporary build directory, not user content

Fixes #54

Co-authored-by: H <[email protected]>
@jazzberry-ai
Copy link

jazzberry-ai bot commented Jul 24, 2025

Bug Report

Name Severity Example test case Description
.dory-build-temp directory not deleted High 1. Create a docs directory. 2. Create a .dory-build-temp directory. 3. Run the dory build command. 4. Verify that the .dory-build-temp directory still exists after the build. The CLI build process does not correctly delete the .dory-build-temp directory after the build, which can lead to unexpected behavior and potential data loss.

Comments? Email us.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jul 24, 2025

Bug Report

Name Severity Example test case Description
Inconsistent Backtick Wrapping Medium Use an unknown tag like <foo> outside a code block. The code uses double backticks to wrap unknown opening tags in the first regex replacement but uses single backticks in the second regex replacement for both opening and closing tags.
Performance of isInsideCodeBlock Low Use a long MDX file with lots of code blocks. The isInsideCodeBlock function might be slow for large files because it uses a regex to count backticks.
Potential Regex Vulnerability Medium Craft a malicious MDX file with overlapping tags and many backticks. The regular expressions in the sanitize plugin might be vulnerable to ReDoS attacks, causing high CPU usage and potential denial of service.

Comments? Email us.

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.

Dory build is revert the mdx files

2 participants