DioxusLabs / DioxusLabs/dioxus
Document Level Tags Are Applied In Reverse Order
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
Document level tags do not respect order. E.g. for
```rust
rsx! {
document::Script { src: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" }
document::Script { src: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/rust.min.js" }
document::Script { {r#"
document.addEventListener("DOMContentLoaded", () => {
hljs.highlightAll();
});
"#} }
}
}
```
In browser:
```html
document.addEventListener("DOMContentLoaded", () => {
hljs.highlightAll();
});
```
Also worth noting that muli-line str `r#" "#` breaks `dx fmt`.
**Expected behavior**
```html
document.addEventListener("DOMContentLoaded", () => {
hljs.highlightAll();
});
```
**Screenshots**
**Environment:**
- Dioxus version: 0.6.2
- Rust version: 1.86.0 nightly
- OS info: NixOS 25.05
- App platform: web
**Questionnaire**
I'm interested in fixing this myself but don't know where to start.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.