Skip to content

Problem with El's text #31

@magdaddy

Description

@magdaddy

Thank you David for your awesome work! I'm very new to Rust and Seed is the only frontend framework I find accessible.

But I discovered a problem. If I put multiple text nodes in an El, only the last one survives.

An example:
p![ "Today it's ", em!["not"], " gonna rain, this ", em!["is"], " so ", strong![ "good!" ] ]
becomes
<p> so <em>not</em><em>is</em><strong>good!</strong></p>

I suppose it's because the text in the El-struct is Option<String>. Maybe we need Vec<String>. But then it's still not clear where which text should go. Maybe it's best to have a special "Text"-Node that can go in the children-Vec.
For now we can work around this e.g. wrapping the text in <span> tags.
When I have a better understanding of the codebase I try to contribute a fix, but as I said, I'm very new to Rust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions