Compiling BP kills line breaks in comments

Since 4.9 it’s possible to add linebreaks in comments with shift+enter:


After I press compile, all the linebreaks are getting removed:

Hello,

I have attempted to reproduce your issue, but whenever I use Shift+Enter to create a line break in a node comment and then compile, I do not experience the behavior that you’re seeing. I have a few questions that could help with reproducing your issue:

  • Are there any unusual settings that you may be using?
  • Also, is this occurring only in version 4.9, or can you reproduce it in other versions, such as 4.10?
  • Are you using a Mac or PC?

Thank you.

  • No, I am not using unusual settings (which one?)
  • Seems the same with 4.10.0
  • PC

I’ve made a few more tests:

  • Create a new blueprint
  • Insert a node like ‘Print String’
  • Right click and write comment ‘this is a long comment’ (press Shift+Enter)

(The window just closes, there is no linebreak inserted)

  • Click into the comment bubble, try again to press Shift+Enter at the end of the line

(This time, the line-break gets inserted)

  • Write something in the second line like ‘over more than one line’
  • Press Enter
  • Press ‘Compile’

(Strangely, somethings the linebreak gets killed, sometimes it stays)

  • Now click into the comment bubble again, delete the text by pressing DEL

(The text is removed, but the empty bubble stays there)

  • Right-click on the comment bubble again

(As you can see, the test was NOT removed but is still visible in the context-menu under ‘Node comment’.)

I’ve attempted to reproduce your issue using the steps you provided, but I am still unable to experience the same behavior. Compiling multiple times doesn’t seem to be removing my line breaks. If this is an issue that you are experiencing regularly in your project, could you provide that project so that I could see what is causing the issue? Thank you.

What about the other issues? Do they really all not apply to you? Unfortunately I can’t give away the project but I wonder which setting could possibly cause all those behaviours.

For this topic, we are focusing on the compiling causing the line breaks to disappear. If you would like to open other topics relating to the other issues, we will investigate those as well.
Just to clarify, this issue occurs in a new project for you as well?

Hello ,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If the issue is still occurring, or if you have any new information, feel free to post on this topic. For any new issues, please create a new Answerhub thread.

Have a great day,

Sean Flint

To help others with this issue: The problem repeatably (for me, 4.10.4, all default settings) comes when you click outside the comment to stop commenting instead of hitting Enter to stop commenting.

To reproduce:

  1. Comment any node with a long text line.
  2. Click anywhere in the middle, tap Shift-Enter to break up the line.
  3. Click anywhere on the blueprint grid, the comment will still have a newline and appear to be edited.
  4. Click Compile. The multi-line comment(s) will revert.

Workaround/repro case for correctly entering newlines:
Follow the same steps, but for step 3, hit Enter. On compiling, the comments will remain with newlines.

I suspect in the above repro case, the user sometimes hit enter to end comment editing, and sometimes clicked elsewhere (as they saw it irregularly work, and in my case I never thought about my default “brain macro” which is apparently set to sometimes hit enter and sometimes click elsewhere) but YMMV.

Happy to send a project file with the repro case if necessary.