No description
Find a file
Chris Wong 1785071f1b Allow terminating void elements with semicolons (;)
When Rust and HTML syntax differ, Maud tends to side with Rust syntax.
This can be seen with string literals, for example, where we use
backslash escapes instead of HTML entities. Using `;` to terminate void
elements is consistent with this idea.

Moreover, this reduces confusion around the generated code. Maud does
not insert an extra slash into the HTML output (as per the spec) but
the syntax may imply otherwise.

This confusion may have been the cause of a [bug I found in the
wild][1], where the code omitted the trailing slash on an `input`
element. I suspect that this is because the author thought that a
trailing slash in the Maud template would lead to one in the HTML
output. Switching to semicolons would prevent this misconception.

[1]: https://github.com/anowell/quasar/pull/3
2017-08-04 20:58:02 +12:00
benchmarks Use toggled class shorthand in benchmark 2016-11-24 20:45:08 +13:00
maud Allow terminating void elements with semicolons (;) 2017-08-04 20:58:02 +12:00
maud_extras Fix maud_extras 2017-07-23 13:58:42 +12:00
maud_htmlescape Move escaping routines into a shared maud_htmlescape crate 2017-07-29 20:03:00 +12:00
maud_lints Move lints into their own maud_lints crate 2017-07-30 22:18:26 +12:00
maud_macros Allow terminating void elements with semicolons (;) 2017-08-04 20:58:02 +12:00
.gitignore First commit 2014-12-17 21:11:56 +13:00
.travis.yml Travis: don't use --manifest-path for Clippy 2017-07-31 22:05:23 +12:00
Cargo.toml Move lints into their own maud_lints crate 2017-07-30 22:18:26 +12:00
CHANGELOG.md Allow terminating void elements with semicolons (;) 2017-08-04 20:58:02 +12:00
CONTRIBUTING.md Update CONTRIBUTING.md 2017-07-30 22:01:07 +12:00
LICENSE-APACHE First commit 2014-12-17 21:11:56 +13:00
LICENSE-MIT First commit 2014-12-17 21:11:56 +13:00
maud.png HTML5 rocks 2015-01-11 15:05:42 +13:00
README.md Update readme for new proc macro API 2017-07-30 16:25:44 +12:00

HTML5 rocks. maud Build Status Cargo

Documentation (source) • API referenceChange log

Maud is an HTML template engine for Rust. It's implemented as a macro, html!, which compiles your markup to specialized Rust code. This unique approach makes Maud templates blazing fast, super type-safe, and easy to deploy.

Note that Maud depends on the unstable procedural macro API, and so requires the nightly version of Rust.

For more info on Maud, see the official book.

Stability

As of version 0.11, I am satisfied with the core syntax and semantics of the library. Development at this stage is focused on adding features and fixing bugs.

The underlying procedural macro API is still unstable though, so updating your compiler may break things. Please file an issue when this happens!