cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG] Q&A - editing code formatted text converts enters to html breaks

Johan_Hakkesteegt
Active Contributor
0 Kudos
227

Hi,

When editing a comment (I have not tested it with an answer) that contains text formatted as code, that contains one or more enters, these enters are converted to HTML breaks <br>

I will test it out here
to see if it also applies
to questions
edit: and apparently it does not

Regards,

Johan

Johan_Hakkesteegt
Active Contributor
0 Kudos

Let's see if I can reproduce it here:

How<br>Now<br>Brown<br>Cow
edit: and there we have it
former_member28818
Contributor
0 Kudos

Hello Johan, apologies but I am not sure what the bug is from your description. I have tried inserting code below and pressed multiple enters. As expected, the cursor moved down a line as in a line break. If this is a bug, what is the expected behavior?

asd
asd
asd

Thanks,

Sajid Amir

Johan_Hakkesteegt
Active Contributor
0 Kudos

Hi Sajid,

In my own comment above, you see the <br>s (HTML line breaks). I did not write those, instead the editor wrote them where I had originally written a line break (enter). This appears to happen when you edit the comment

It would seem that the behavior happens in specific scenarios only. I have not tested whether this happens with manual line breaks or with line breaks the editor provides, or with a combination of the two, or perhaps after removing the line breaks provided by the editor.

Regards,

Johan

former_member28818
Contributor
0 Kudos

Thank you for clarifying and testing Johan. I will share this with the team.
Best regards,

Sajid

Accepted Solutions (0)

Answers (1)

Answers (1)

Johan_Hakkesteegt
Active Contributor
0 Kudos

Let's see if we can reproduce it in an answer:

How
Now
Brown
Cow
edit: it does not appear to happen in answers
Johan_Hakkesteegt
Active Contributor
0 Kudos
How
Now
Brown
Cow


becomes:


How<br>Now<br>Brown<br>Cow
former_member186338
Active Contributor
0 Kudos

Just another test:

Test1
Test2
Test3<br>

only single "<br>" is added
Johan_Hakkesteegt
Active Contributor
0 Kudos

And one more test:

How
Now
Brown
Cow

edit: can't reproduce it
Johan_Hakkesteegt
Active Contributor
0 Kudos

Testing some more. This time normal text with manual line breaks, formatted as code afterwards:

Result after edit:

How<br>Now<br>Brown<br>Cow
Johan_Hakkesteegt
Active Contributor
0 Kudos

Testing some more. This time code formatting turned on first, then entered text with manual line breaks:

Result after edit:

How
Now
Brown
Cow