Hi Konstantinos. After a recent discussion with the team, we concluded that you will want to edit your custom codes as Plain Text in order to remove the line break when it is parsed into an outgoing message.
The reason this can not be done transparently is because we wish to provide maximum functionality with the custom codes, which means rich text support. As a result, the rich text editor automatically wraps the text in a paragraph tag. This means that when the code gets inserted, it will automatically insert the line break at the end. If you save the custom code as plain text, and manually remove the <p> tag, then you will be able to insert the custom code in-line with other text, and not have the line break added at the end.
Sorry if it's not the exact solution that you would like, but this will work for what you are experiencing. We think the benefits of keeping custom codes as rich text far outweigh the inconvenience of an added line break. As always, we appreciate the feedback.