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

Line Limit modifier produces very unexpected results #24

Open
bryan1anderson opened this issue Mar 30, 2022 · 2 comments
Open

Line Limit modifier produces very unexpected results #24

bryan1anderson opened this issue Mar 30, 2022 · 2 comments

Comments

@bryan1anderson
Copy link

    Parma(markdown, render: MyRender())
        .lineLimit(1)

I would expect this to work similarly to Text or not at all.. but it does work. Just not predictably.

It clips each line. Looks like it might be applying the limit to literally each line individually.

Any workaround suggestions would be greatly appreciated

@dasautoooo
Copy link
Owner

Hi @bryan1anderson ,

Parma(markdown, render: MyRender()) returns a VStack which contains all the elements. If you apply .lineLimit(1) to it, it will affect each Text inside the VStact to have the line limit behavior.

What's your expectation of it? Maybe we can make some custom modifier to support this.

@bryan1anderson
Copy link
Author

I'm creating a journal, and would like to use Parma. I need to constrain the parma view to a limited number of lines the same way I would a normal Text view. For now I've worked around it and essentially gone on a character limit, but its not pretty and not as uniform as it could be.

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

No branches or pull requests

2 participants