* Update `axum-core` depedency to 0.2
* Update doctest to use Axum 0.5
* Update CHANGELOG.md regarding axum
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
* Use explicitly-named args in `impl_render_with_display`
Implicitly-named args were failing on Rust 1.57 (but worked on Nightly).
* Fix macro formatting
Also add a TODO comment to revert later.
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
* Update to axum-core 0.1
Together with the new 0.4 release of `axum` we made a new crate called
[`axum-core`]. `axum-core` has a small API and is less likely to receive
breaking changes. Therefore its recommended for libraries to depend on
`axum-core` instead of `axum`.
So this updates `maud` to use `axum-core`.
Note this is a breaking change since `axum-core` requires `axum` 0.4.
[`axum-core`]: https://crates.io/crates/axum-core
* Update changelog link
* fix test
# Overview
The following syntax will no longer work:
```rust
html! {
br /
link rel="stylesheet" href="styles.css" /
}
```
This should be changed to the following:
```rust
html! {
br;
link rel="stylesheet" href="styles.css";
}
```
# Rationale
The `;` syntax was introduced in #96; the rationale for it can be found there.
Removing support for the older `/` syntax will simplify the API surface, and allow for the space to be used for other things.
The Iron framework hasn't been updated in a long time. It still uses outdated versions of libraries like futures 0.1, hyper 0.12, url 1.7. We can clean up the repo by removing it. This will also slightly speed up CI.
* Add support for Option<T> attributes
Introduces the `attr=[value]` syntax that assumes `value` is an
`Option<T>`. Renders `attr="value"` for `Some(value)` and entirely
omits the attribute for `None`.
Implements and therefore closes#283.
* Call `Generator::splice` directly
* Handle struct literals (edge case)
Co-authored-by: Chris Wong <xbuns@google.com>
This introduces support for Tide by implementing `From` over markup.
Unlike other frameworks, Tide does not seem to provide e.g. a trait
which could instead be implemented. However as demonstrated, this
alternative results in a simple, ergonomic interface.
Consumers may leverage Tide support by using the "tide" feature.
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
Removed references to `std` and replaced them with references to `core` and `alloc`.
Features `rocket` and `iron` still require `std`.
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>