Commit graph

559 commits

Author SHA1 Message Date
Chris Wong
b4faef8176 Update to rustc 1.21.0-nightly (f25c2283b 2017-08-15)
Closes 
2017-08-16 20:36:31 +12:00
Chris Wong
594af15242 Remove unnecessary extern crate 2017-08-12 19:44:43 +12:00
Chris Wong
5cd51481c9 Rename Renderer to Builder 2017-08-12 17:41:54 +12:00
Chris Wong
a902c97091 Allow braces in toggled classes 2017-08-12 16:50:54 +12:00
Chris Wong
9487dbc3a7 Move some code around 2017-08-12 16:21:13 +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
21d19adb13 Add some more comments 2017-07-31 22:25:00 +12:00
Chris Wong
8a147fb829 >_< 2017-07-31 22:13:09 +12:00
Chris Wong
bd228c01a9 Travis: don't use --manifest-path for Clippy
For some reason, `cargo clippy` ignores the tests when run with the
`--manifest-path` option.
2017-07-31 22:05:23 +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
3de5f7f3e9 Move lints into their own maud_lints crate 2017-07-30 22:18:26 +12:00
Chris Wong
99ee994143 Update CONTRIBUTING.md 2017-07-30 22:01:07 +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
24d46d5db4 Update readme for new proc macro API 2017-07-30 16:25:44 +12:00
Chris Wong
f68e201ce9 Add proc macro update to change log 2017-07-30 14:22:45 +12:00
Chris Wong
2353a64ce9 Merge branch 'proc-macro' 2017-07-30 14:06:03 +12:00
Chris Wong
4f7189375e Avoid using quote! in parser 2017-07-30 13:59:35 +12:00
Chris Wong
565360f2d5 Travis: remove tab check
We should be using a more comprehensive formatting check based on
rustfmt instead.
2017-07-29 20:14:13 +12:00
Chris Wong
f1fbea181a Reduce duplication in Travis config 2017-07-29 20:06:28 +12:00
Chris Wong
7dcc7d7063 Fix Clippy warnings 2017-07-29 20:06:28 +12:00
Chris Wong
2213c0dc32 Move escaping routines into a shared maud_htmlescape crate 2017-07-29 20:03:00 +12:00
Chris Wong
37419d9781 Implement match expressions and remove debugging stuff 2017-07-29 14:33:10 +12:00
Chris Wong
fd7e000cda TokenTreeIter values can be cloned now 2017-07-29 13:24:40 +12:00
Chris Wong
513d7f3d73 Implement for expressions 2017-07-23 14:08:19 +12:00
Chris Wong
cd113be71b Implement while expressions 2017-07-23 14:03:23 +12:00
Chris Wong
62bdd4b06a Use literalext from crates.io 2017-07-23 14:00:49 +12:00
Chris Wong
798f9baee8 Implement if expressions 2017-07-23 13:58:42 +12:00
Chris Wong
af57ac41ce Refactor backtracking mechanism 2017-07-23 13:58:42 +12:00
Chris Wong
748ce69f4d Use loop-break-value
It's stable now!
2017-07-23 13:58:42 +12:00
Chris Wong
88c8a7e8c9 Revert "Silence collapsible_if warnings ()"
This reverts commit a72877cb55.
2017-07-23 13:58:42 +12:00
Chris Wong
3d1e82b20e Implement let expressions 2017-07-23 13:58:42 +12:00
Chris Wong
e61385645e Don't throw away spans 2017-07-23 13:58:42 +12:00
Chris Wong
6a593388ae Fix maud_extras 2017-07-23 13:58:42 +12:00
Chris Wong
e0c7fcf055 Initial stab at porting to new proc macro interface 2017-07-23 13:58:42 +12:00
Chris Wong
7ac9c04f0e Tweak changelog to link to Rocket 0.3 pull request 2017-07-15 12:50:26 +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
a72877cb55 Silence collapsible_if warnings () 2017-07-08 20:21:04 +12:00
Chris Wong
04eb61e870 Use docs.rs for hosting API documentation 2017-06-19 21:25:19 +12:00
Chris Wong
dfad8b3d03 Merge branch 'error_macro_to_function' 2017-06-03 12:42:47 +12:00
Chris Wong
a51a16bdc7 Minor tweaks 2017-06-03 12:42:36 +12:00
Alisha
61bbcfdb69 Remove error macro and make error function 2017-05-30 01:59:18 +10:00
Chris Wong
348712f3f4 Add #![doc(html_root_url = "...")] attribute 2017-05-13 14:16:41 +12:00
Chris Wong
be88fc39d5 Release 0.16.3 2017-04-22 20:00:21 +12:00
Chris Wong
0ec0950c5f Remove FlattenNtFolder
The tests pass without it, so 🤷
2017-04-22 17:29:56 +12:00