twostraws / Ignite

A static site generator for Swift developers.
MIT License
1.53k stars 73 forks source link

Simple line breaks in markdown or using `Text()` #91

Open markstamer opened 4 days ago

markstamer commented 4 days ago

It seems that line breaks are ignored in markdown. This is all rendered inline:

Text(markdown: """
Sollicitudin Etiam
Etiam Sem 42
12345 Purus 
""")

Also it would be great to have simple line breaks that don't introduce space between two lines to work, e.g. by ending a line with a backslash. I couldn't achieve this with Text either, e.g. by putting multiple text elements in a Group. It would be great for something like displaying an address.

henrikac commented 3 days ago

Not sure if you have tried this but try end lines with two or more spaces.

Markdown Guide - Line Break Best Practices

markstamer commented 3 days ago

Thanks for your comment but it doesn't work either. I have "Automatically trimming trailing whitespace" in Xcode enabled but turning it off didn't work either.