render-rs / render.rs

🔏 A safe and simple template engine with the ergonomics of JSX
https://docs.rs/render
MIT License
238 stars 23 forks source link

Reversing DOM order #16

Open theashguy opened 4 years ago

theashguy commented 4 years ago

Hah, here is an interesting one.

The order of DOM items inside returned containers seems to be rendered reversed. It looks like the library is more broken than I had originally thought.

For example...

<html>
  <head><title>{title}</title></head>
  <body>
    <h1>{subtitle}</h1>
    <p>{"This should come second"}</p>
  </body>
</html>

renders as

<html>
  <head><title>{title}</title></head>
  <body>
    <p>{"This should come second"}</p>
    <h1>{subtitle}</h1>
  </body>
</html>

Will see if I can raise some PRs to get this in working order.

theashguy commented 4 years ago

PR up for this. Though I've messed my branches up, so I might cancel PR15 and merge the PR for this with the visibility fix. Future PR's will come through independently.