Commit graph

129 commits

Author SHA1 Message Date
Chris Wong
9d90e94c87
Change macro internals to use an explicit AST () 2018-05-17 20:38:44 +12:00
Chris Wong
7c63fc138a Release 0.17.4 2018-05-02 20:49:17 +12:00
Chris Stadler
e606e64ef2 Enable proc_macro_non_items feature flag 2018-04-28 12:59:24 +12:00
Chris Wong
41f7744fe1 Release 0.17.3 2018-04-21 17:20:42 +12:00
Coleman McFarland
2d6558c769 Use FromIterator<_> for TokenStream
Also remove conservative_impl_trait feature flag, as this is now a
stable feature.

Refs 
2018-04-16 00:54:32 -07:00
Chris Wong
62298aec55 Release 0.17.2 2017-11-19 20:12:38 +13:00
Ernestas Poskus
250c736b11 Bump iron to 0.6.0 version 2017-11-12 23:37:41 +13:00
Chris Wong
d1a44be51d Silence "unknown lint" warning when running not-Clippy 2017-10-07 16:26:45 +13:00
Chris Wong
f6c9e25722 Enable lints on tests and extras; fix maud_doctype lint not firing 2017-10-07 14:45:06 +13:00
Lukas Kalbertodt
97a4bdf30e Add Clone and Copy impl to PreEscaped via derive () 2017-08-26 12:14:13 +12:00
Chris Wong
a902c97091 Allow braces in toggled classes 2017-08-12 16:50:54 +12:00
Chris Wong
080b461f1b Release 0.17.1 2017-08-11 21:15:20 +12:00
Chris Wong
f046b64409 Avoid name collisions when Render trait is already in scope
Closes 
2017-08-11 20:00:10 +12:00
Chris Wong
9fc96ea5c3 Fix docs to use semicolons instead of slashes 2017-08-05 16:42:15 +12:00
Chris Wong
752c4805e4 Release 0.17.0 2017-08-04 22:22:38 +12:00
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
Chris Wong
8a147fb829 >_< 2017-07-31 22:13:09 +12:00
Chris Wong
c57d41e1a6 Handle conditions which contain braces 2017-07-31 22:03:50 +12:00
Chris Wong
d3586a28f3 Remove braces from let expressions
Also improve spans by passing more of the input through directly
2017-07-31 21:48:11 +12:00
Chris Wong
4a733993c8 Make let expression type ascription test a bit more elaborate
An overly strict parser would choke on the `=` in `Iterator<Item=u32>`,
so this case is worth keeping as a regression test.
2017-07-30 21:17:12 +12:00
Chris Wong
cf403b3f6e Add test for type ascription in let expressions 2017-07-30 21:08:14 +12:00
Chris Wong
2213c0dc32 Move escaping routines into a shared maud_htmlescape crate 2017-07-29 20:03:00 +12:00
Chris Wong
e0c7fcf055 Initial stab at porting to new proc macro interface 2017-07-23 13:58:42 +12:00
Brayden
70f55b9771 Update to Rocket 0.3 ()
Also fixes diff links in CHANGELOG.md.
2017-07-15 12:43:29 +12:00
Chris Wong
04eb61e870 Use docs.rs for hosting API documentation 2017-06-19 21:25:19 +12:00
Chris Wong
348712f3f4 Add #![doc(html_root_url = "...")] attribute 2017-05-13 14:16:41 +12:00
Chris Wong
d8440bd214 Release 0.16.2 2017-03-07 21:47:46 +13:00
Chris Wong
23399225c3 Add juicy metadata to Cargo.toml 2017-02-17 22:23:44 +13:00
Chris Wong
7b67fe1e3e Release 0.16.1 2017-02-15 22:26:45 +13:00
Ferdinand Bachmann
8ab628faa2 Update Rocket dependency to version 0.2.0 ()
* Update Rocket dependency to version 0.2.0

* Change rocket dependency to version range
2017-02-14 22:54:27 +13:00
Chris Wong
9ca984c89b Release 0.16.0 2017-02-06 16:12:58 +13:00
Chris Wong
f858430b51 Update to Iron 0.5.1
See 
2017-01-29 12:37:05 +13:00
Chris Wong
4d4ba6c59b Release 0.15.0 2017-01-26 20:15:49 +13:00
Chris Wong
ab38909e34 Rocket: specify explicit HTML content type
See 
2017-01-26 17:00:10 +13:00
Chris Wong
4cc8698638 Add Rocket support 2016-12-30 21:08:38 +13:00
Chris Wong
c57ee6e683 Remove RenderOnce
Closes 
2016-12-23 20:38:53 +13:00
Chris Wong
dab8e5108a Add impl Into<String> for PreEscaped
This allows for passing `Markup` values directly to Rouille's
[`Response::html`][1] constructor.

[1]: https://docs.rs/rouille/0.4.1/rouille/struct.Response.html#method.html
2016-12-17 13:41:59 +13:00
Chris Wong
fb935c2e13 Release 0.14.0 2016-11-24 20:34:45 +13:00
Chris Wong
b76bda0e50 Add a "DOCTYPE" constant 2016-11-22 21:58:06 +13:00
Chris Wong
c614478bd5 Release 0.13.0 2016-11-03 23:17:34 +13:00
Chris Wong
ac259ebe47 Don't escape single quotes 2016-11-03 23:13:20 +13:00
Chris Wong
90e0f1ccbd Restrict PreEscaped to T: AsRef<str>
Closes 
2016-10-22 19:57:48 +13:00
Chris Wong
f57aa4ace0 Remove #[inline(never)] annotations
On further testing, I find that these annotations no longer have an
effect on performance. Whether that's due to wrong methodology or
changes in rustc codegen I'm not sure.
2016-10-10 18:59:45 +13:00
Chris Wong
c70aa3c7f0 Release 0.12.0 2016-10-09 20:18:34 +13:00
Chris Wong
7d6e2e7c22 Move change log into the right place 2016-10-09 19:05:58 +13:00
Chris Wong
3120eb719d Fix test breakage (again)
I should try testing changes before pushing them lol
2016-10-08 22:32:20 +13:00
Chris Wong
3c9f318c98 Add a changelog 2016-10-08 22:19:35 +13:00
Chris Wong
9fa87721e6 Rewrite Render and RenderOnce traits
... to make them more user-friendly.

Closes 
2016-10-08 21:50:59 +13:00
Chris Wong
4284875869 Change escaper to use bytes instead of chars
This removes the overhead from UTF-8 encoding, and makes us faster than
Horrorshow again :)
2016-10-05 20:43:24 +13:00
Chris Wong
fedaded75a Release 0.11.1 2016-09-25 12:50:33 +13:00