indragiek / CocoaMarkdown

Markdown parsing and rendering for iOS and OS X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bulleted lists line break bug

dmauro opened this issue · comments

Two bulleted lists with two line breaks between them causes there to be a line break between the bullets and that list item's contents. For example, take this markdown with three bullet points:

* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n* Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n* Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

That results in what you'd expect of our bulleted lists:
screen shot 2017-01-24 at 11 04 15 am

But if you simply add another \n between the second and third bullet points (we'd expect this to create two different bulleted lists), you instead get this:
screen shot 2017-01-24 at 11 05 28 am

Just double checked this on the latest from master.

Turns out I wasn't on the latest master after all. This was fixed on master after all. The issue was caused by the paragraphStyle changing and causing a line break.