Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List Formatting #52

Closed
chulbert opened this issue Mar 15, 2024 · 4 comments
Closed

List Formatting #52

chulbert opened this issue Mar 15, 2024 · 4 comments
Labels
2024-04 enhancement New feature or request question Further information is requested

Comments

@chulbert
Copy link

This is an excellent library that meets all our needs except one: list formatting.

For an unordered list like the following:

<ul>
  <li>ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.</li>
  <li>ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.</li>
  <li>ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.</li>
</ul>

The rendered output is:

Screenshot 2024-03-15 at 11 26 14 AM

This falls short of our need in a couple ways:

  1. There is no spacing between the bullet and the text. This makes them very hard to read.
  2. The wrapped text should align with the start of the first line, similar to the following:
Screenshot 2024-03-15 at 11 35 41 AM

It would be great if this could be achieved. Otherwise lists are fairly unusable.

@zhgchgli0718 zhgchgli0718 added the enhancement New feature or request label Mar 17, 2024
@zhgchgli0718 zhgchgli0718 added question Further information is requested 2024-04 labels Mar 26, 2024
@pykaso
Copy link

pykaso commented May 28, 2024

You can take a look at my PR, where I am trying to solve this problem.

@zhgchgli0718
Copy link
Member

zhgchgli0718 commented May 28, 2024

Thanks @chulbert for reporting this issue and @pykaso for providing the solution PR.
Based on the PR provided by @pykaso, I gained a lot of inspiration regarding HTML list formatting.
As a result, I studied the entire problem and proposed a more comprehensive fix and solution.
Thank you all for your support and patience.

#61

@zhgchgli0718
Copy link
Member

zhgchgli0718 commented May 28, 2024

It should be fixed in v1.9.3

@zhgchgli0718
Copy link
Member

ref: readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024-04 enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants