indragiek / CocoaMarkdown

Markdown parsing and rendering for iOS and OS X
MIT License
1.2k stars 158 forks source link

Fix line break separator #35

Closed vdugnist closed 5 years ago

vdugnist commented 8 years ago

Based on apple mailing list you should use unicode line separator symbol for line breaks. \n is used for paragraph separation.

Here's my paragraph style:

paragraphStyle.lineSpacing = 0;
paragraphStyle.paragraphSpacing = 10;

Example markdown:

## Text with linebreaks
Lorem ipsum dolor sit amet, consectetur adipiscing elit,  
sed do eiusmod tempor incididunt ut labore et dolore magna  
aliqua. Ut enim ad minim veniam, quis nostrud exercitation  
ullamco laboris nisi ut aliquip ex ea commodo consequat. 

Duis aute irure dolor in reprehenderit in voluptate velit  
esse cillum dolore eu fugiat nulla pariatur.  
Excepteur sint occaecat cupidatat non proident, sunt in  
culpa qui officia deserunt mollit anim id est laborum.

Result before my commit: img_1301

And result after commit: img_1300