Copy link to clipboard
Copied
I have a very long code that needs to be written to a file using FL file.write(). But in the file, the code that should be written in one line is written as several paragraphs. Because of this, my code doesn't work. Is there a way to fix this problem?
I think you're gonna have to use some regex to remove line breaks.
When I use an online tool like this one, I can get your text in one single line.
Copy link to clipboard
Copied
Hi.
Can you show us the complete code or at least the most relevant parts?
Regards,
JC
Copy link to clipboard
Copied
Here is a link to the original project https://drive.google.com/file/d/1br2ST5Tww4hEdPmXh5_C6fcsNJooITJK/view?usp=sharing
I'm making a plugin installer
Copy link to clipboard
Copied
Thanks for the file.
This is what I get in Visual Studio Code:
Without word wrap:
With word wrap:
Copy link to clipboard
Copied
again, the uploaded file is one line.
and you can't definitively say anything with screenshots. ie, they are misleading.
but you both should be able to place the curser at any spot you think is just prior to a break and then use the next arrow to see if there's anything (eg, a line break) between two characters.
or change your text/code editors width. is there a spot that consistantly "appears" as if it's a line break?
Copy link to clipboard
Copied
I recorded a video where I demonstrate the problem. After transferring the text to the first line, everything worked. But I'm making a script for the user, which should get the finished result without correcting the code in the files https://drive.google.com/file/d/1SG-kY90e5v84ZYVgl-PAkKBF8oxYjtrJ/view?usp=sharing
Copy link to clipboard
Copied
the video quality is too poor (for me) to see anything helpful.
Copy link to clipboard
Copied
I just have a word wrap (as in the second screenshot). I need to avoid it. All code should be written in one line
Copy link to clipboard
Copied
I think you're gonna have to use some regex to remove line breaks.
When I use an online tool like this one, I can get your text in one single line.
Copy link to clipboard
Copied
Great, that's just what I need. Thank you very much
Copy link to clipboard
Copied
You're welcome!
Copy link to clipboard
Copied
the topmost code you showed is one line.
where do you see a line break (not a line wrap)?
Copy link to clipboard
Copied
The message code should be written on one stoic for correct operation, but I have a line break
Copy link to clipboard
Copied
copy and paste here the few hundred characters above and below the line break.