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

Diff detection regex is incorrect #5

Open
Shakahs opened this issue Mar 23, 2023 · 2 comments
Open

Diff detection regex is incorrect #5

Shakahs opened this issue Mar 23, 2023 · 2 comments

Comments

@Shakahs
Copy link

Shakahs commented Mar 23, 2023

The regex re.search(r'```diff(.*?)```', cr.text, re.DOTALL)" is searching for a marker that is part of Github's proprietary Markdown syntax to enable code highlighting.

The base prompt is asking for output compatible with the patch command, so pair is not detecting any of the code diffs that I generate unless I start them with "generate a github markdown diff...".

@wskish
Copy link
Contributor

wskish commented Mar 25, 2023

we are seeing multiple issues with the diffs. I guess we should add the "generate a github markdown diff" to the base prompt to make it more clear that we expect this particular prefix.

@Shakahs
Copy link
Author

Shakahs commented Mar 25, 2023

The prompt is asking for a patch file and pair is applying it with patch. The regex should be changed to match a patch file.

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

No branches or pull requests

2 participants