My long st.write text sometimes leave various spaces

I used st.write(a lot of letters) and the streamline run became putting random spaces and clear lines, my code is:
st.write(β€œSo, I know elementary has been a long boring time, especially in :blue[math], and i swear, this will be so much :red[harder], believe me. In this middle school period, you will learn things like Prealgebra, Algebra 1, Geometry, and other stuff. But you are very lucky you have this digital notebook, and I promise that I willmake this boring period :orange[fun]. It is still going to be a LONG journey though. By the way, :rainbow[let’s get started!]”)

Yes, I am a math teacher.

And when I ran it to the device, this is what happened:

So, I know elementary has been a long boring time, especially in math, and i swear, this will be so much harder, believe me. In this middle school period, you will learn things like Prealgebra, Algebra 1, Geometry, and other stuff. But you are very lucky you have this digital notebook, and I promise that I willmake this boring period fun. It is
still going to be a LONG journey though. By the way, l
et’s get started!

It renders as expected for me.

Wait, maybe it was my usage error, when I rerun it, it worked. Sorry for the problem!