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

Add support for multi-level ordered lists #18

Merged
merged 7 commits into from May 18, 2021

Conversation

antoinelamy
Copy link
Contributor

@antoinelamy antoinelamy commented May 13, 2021

Add support for multi-level ordered lists supporting two types of delimiters: parenthesis and periods.

It also support mix-and-matching delimiters and list styles. As an exemple, the following markdown:

1) Item 1
1) Item 2
1) Item 3
   1. Item 3a
      * Item 3a1
      * Item 3a2
   1. Item 3b
1) Item 4
1) Item 5
   1. Item 5a
   1. Item 5b

Would produce the following result with the default ParmaRenderable:
Screen Shot 2021-05-13 at 5 38 48 PM

Notes

  • The default bullet list style has been updated to switch between and for better readability
    Screen Shot 2021-05-13 at 5 53 43 PM

  • Fixes the additional spacing for multi-level lists when entering a deeper level
    Screen Shot 2021-05-13 at 5 52 35 PM

@antoinelamy
Copy link
Contributor Author

Should I bump version number in the podspec?

@dasautoooo
Copy link
Owner

Hi @antoinelamy ,

Thank you so much for this PR, it is amazing!
It looks good for me, and we're definitely going to bump to 0.3.0.

The list item delegate method is changed, so the code snippet in the readme should change either.

Thanks again!

Copy link
Owner

@dasautoooo dasautoooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the list item delegate method is changed, the embedded sample should be changed either; it's the ContentView.swift file in Sample/Shared.

Sources/Parma/Element/ListAttributes.swift Outdated Show resolved Hide resolved
Sources/Parma/Render/ParmaRenderable.swift Show resolved Hide resolved
@antoinelamy
Copy link
Contributor Author

Since the list item delegate method is changed, the embedded sample should be changed either; it's the ContentView.swift file in Sample/Shared.

I updated the sample to give an exemple of a basic ParmaRenderable implementation like the other elements.

@antoinelamy
Copy link
Contributor Author

I would be curious to know what is your setup to build this project, I had to manually delete the Down file references pointing to the build directory and add them back as a SPM dependency for the project to compile. I'm pretty sure you don't go over these steps so maybe I'm doing something wrong or maybe it could be documented in the Readme for future contributors. Anyway, great library 👌🏻.

@dasautoooo
Copy link
Owner

It's unnecessary to manually do that because a skeleton project has already added, which is the sample project, and it contains the Xcode project of Parma. Use that to build either Parma or the iOS skeleton app, make sure to run swift package generate-xcodeproj to generate the correct Parma.xcodeproj.

Thanks for your advice, and I'll add some contribution messages to the Readme.

Great work, thanks! 😊

@antoinelamy
Copy link
Contributor Author

I think it's the swift package generate-xcodeproj that was missing for me, still not used to SPM yet. Thanks for the tip!

@dasautoooo dasautoooo merged commit a95ab0f into dasautoooo:main May 18, 2021
@dasautoooo
Copy link
Owner

🎉 Parma 0.3.0 was released! Thanks again 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants