Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitHub newlines issue #83 using markdown files approach #88

Merged
merged 2 commits into from
Mar 4, 2025

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
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.

Fix newline escape characters in GitHub messages
1 participant