Course Content
Flask Intensive Course: Web Development with Python
Flask Intensive Course: Web Development with Python
Whitespaces
If we want to add something with the different new lines, like multiple lines:
Let say:
Line 1
Line 2
Line 3
And we post it as you can see the whitespace and new lines are not preserved and are not being rendered here.
Let's go to recipes and the loop where the content is printed out.
And inside <p>
tag write style="white-space: pre-wrap"
. And go back and refresh.
As you can see, the whitespaces and new lines are all preserved. So, actually, we can have multiple paragraphs per recipe description.
Thanks for your feedback!