Skip to content

Conversation

bhouston
Copy link
Member

@bhouston bhouston commented Mar 4, 2025

Fix for GitHub newlines issue #83 using markdown files approach

This PR implements an alternative approach to fix issue #83 where newlines and formatting in GitHub issues, PRs, and comments weren't being preserved correctly.

Changes

  1. Updated the GitHub mode instructions in the system prompt to use temporary markdown files:

    • Create a temporary markdown file with the content
    • Use the file with GitHub CLI commands (e.g., gh issue create --body-file temp.md)
    • Clean up the temporary file when done
  2. Added documentation in README.md about this approach with examples

  3. Created a test file showing how this approach works

Benefits

  • More robust than trying to escape newlines in inline text
  • Preserves formatting, newlines, and special characters correctly
  • Works consistently across different platforms (Windows, Linux, macOS)
  • Follows standard GitHub CLI practices for handling complex content

Closes #83

@bhouston bhouston merged commit 98e8442 into main Mar 4, 2025
2 checks passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version mycoder-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bhouston bhouston deleted the fix-github-newlines-markdown-83 branch March 12, 2025 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix newline escape characters in GitHub messages

1 participant