How to keep text formatting when using formulas?

If I enter 2 lines of text in A1 (let’s say one in bold, one in italic) and use formula =A1 in cell A2, the text formatting is lost.
Is there any work-around for this?

If you are fond of tricky programming, you may find a few ideas and suggestions here.
Of course, this cannot make standard functions to do someting basically unsupported for function results… What I offered there only sketches ways you might go to create text with differently formated pieces in a different target cell by the working of a user function.
To debug and complete the sketched code you need to study the API to some depth.
(Lots of practical problems to be expected. Little use anyway.)

There is no way,