Failure to generate a README.md file

Hi,

I was trying to get Cursor to generate a README.md file. And, it’s generating the file, but in a format that I can’t really use:

See how it breaks up the file into areas that I can’t easily copy. I tried using Compose and even asked it to create the file. It did create the file, but only with the first part. Otherwise it looked the same.

Thank you
Dan

2 Likes

This has been happening ever since I started using Cursor. The output stops using the code box and make one liners. It is incredibly difficult to cut and paste as the cut and paste does not work well in the chat boxes already.

A simple work around is to prompt it to replace all ``` with ``, and then replace `` with ``` in the md.

1 Like

Just to add to the discussion, I have noticed that even when using Chat GPT (Plus) directly, occasionally it does mess up its code snippets, and code will break out of the code snippets and into text, and then the syntax highlighting language can be incorrect etc.

So seeing that Cursor is using these models, I imagine it is possible that the errors are coming from that interaction, as opposed to any parsing of the response that may be occurring in Cursor.

I could be wrong though, and it could be a Cursor issue (others with more knowledge than me can speak to that), but just adding this information and example for reference.

When these things occur, I usually just nudge it again with a prompt like:

Your code snippets were incorrect and broke out of their container, please regenerate them.

And most of the time it will regenerate the code snippets successfully.

1 Like

You genius