Skip to main content
Multoman
Inspiring
Oct 18, 2022 5:15 AM UTC
Answered

A large line is written to a file and divided into paragraphs

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?

  

This topic is closed to new replies. Start a new post to keep the conversation going.
JoãoCésar17023019
JoãoCésar17023019Correct answer
Community Expert
Oct 18, 2022 11:37 AM UTC

I just have a word wrap (as in the second screenshot). I need to avoid it. All code should be written in one line


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.

 

13 replies

kglad
Community Expert
Community Expert
Oct 18, 2022 10:20 AM UTC

the topmost code you showed is one line.

 

where do you see a line break (not a line wrap)?

Translate
Multoman
MultomanAuthor
Inspiring
Oct 18, 2022 10:58 AM UTC

The message code should be written on one stoic for correct operation, but I have a line break

Translate
kglad
Community Expert
Community Expert
Oct 18, 2022 11:01 AM UTC

copy and paste here the few hundred characters above and below the line break.

Translate
JoãoCésar17023019
Community Expert
Community Expert
Oct 18, 2022 9:41 AM UTC

Hi.

 

Can you show us the complete code or at least the most relevant parts?

 

Regards,

JC

Translate
Multoman
MultomanAuthor
Inspiring
Oct 18, 2022 10:50 AM UTC

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

Translate
JoãoCésar17023019
Community Expert
Community Expert
Oct 18, 2022 11:05 AM UTC

Thanks for the file.

 

This is what I get in Visual Studio Code:

Without word wrap:


With word wrap:

Translate