Commit graph

328 commits

Author SHA1 Message Date
Chris Wong
3232fb7eca
Delete maud_htmlescape package ()
Replace it with a symlink. Cargo will automatically resolve this to a
normal file on publish.
2021-11-06 11:33:44 +00:00
Chris Wong
49755007da
Update to Rust 2021 () 2021-11-01 17:18:48 +11:00
Alexandre Macabies
2909e5129c
Add support for Option<T> attributes ()
* 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 .

* Call `Generator::splice` directly

* Handle struct literals (edge case)

Co-authored-by: Chris Wong <xbuns@google.com>
2021-10-29 16:24:34 +11:00
GKnirps
df98f4f00b
Bump dependency proc-macro2 to 1.0.23 ()
- it won't build with 1.0.19
2021-09-28 22:41:20 +10:00
Chris Wong
2700f714bc
Release 0.22.3 () 2021-09-27 11:55:45 +00:00
Emilio González
4b317956fa
Report error for missing closing tag token () 2021-09-18 19:30:13 +10:00
Chris Wong
9a2c4fba4f
Fix Clippy warning () 2021-08-17 19:22:46 +10:00
Benjamin Halsted
3eb4254ffb
Using no_std + alloc ()
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>
2021-07-30 22:05:31 +10:00
Chris Wong
8990049101
Improve error message for non-string literals ()
Closes 
2021-03-21 22:20:37 +11:00
Chris Wong
ce6458af41 Fix doc comments on parser 2021-03-13 20:49:05 +11:00
Chris Wong
9f7331f427
Remove Attrs type alias () 2021-03-13 20:25:56 +11:00
Chris Wong
b8872d4098
Don't call the user a "silly bumpkin" () 2021-01-09 18:51:05 +13:00
Chris Wong
87b7c9c2ba
Release 0.22.2 () 2021-01-09 18:01:17 +13:00
Chris Wong
b286c65939
Use Span::mixed_site directly from proc-macro2 ()
Since 1.0.19, `proc-macro2` now provides `Span::mixed_site` directly.
2021-01-09 17:15:43 +13:00
Chris Wong
5f7cec4da1
Remove Travis status badges ()
cc 
2020-12-23 19:38:27 +13:00
Chris Wong
d5dec51c3a
Make the ? suffix for empty attributes optional () 2020-11-11 16:47:23 +13:00
Chris Wong
0c9b6f2150
Release 0.22.1 ()
* Release 0.22.1

* Update benchmarks and docs dependencies

* Comrak breaking change
2020-11-02 19:24:13 +13:00
Chris Wong
49f3c46bd2
Avoid unstable specialization with this one weird trick! ()
Rustaceans hate him!
2020-10-05 22:44:27 +13:00
Chris Wong
d66c2d66fd
Remove #![feature(proc_macro_hygiene)] () 2020-09-27 23:17:41 +10:00
Chris Wong
50a7e9ce37 Format everything! 2020-09-27 21:36:27 +10:00
CreepySkeleton
4d3d057cc2 Move to trybuild 2020-08-31 11:57:57 +03:00
CreepySkeleton
3e23e0d784 Turn the warning into a hard error 2020-08-31 11:57:57 +03:00
CreepySkeleton
7b06af4369 Fix cargo clippy lints 2020-08-31 11:57:56 +03:00
CreepySkeleton
7d16af9a06 Make use of SpanRange instead of Span 2020-08-31 11:57:55 +03:00
CreepySkeleton
ef120ab2d0 Transfer codebase from ParseResult to abort! 2020-08-30 23:28:49 +03:00
Chris Wong
162a15ca83
Use std::matches! ()
* Use `std::matches!`

- Remove crates.io `matches` in favor of the `std` version

- Fix Clippy warning by changing a `match ... { ... }` to
  `matches!(...)`

* Satisfy `blocks_in_if_conditions`
2020-07-18 17:49:01 +10:00
Byte
a10130a9ac
Switch to 3rd party quote macro ()
* Add proc_macro2 and quote dependencies

* Completly switch over to proc_macro2 where possible

* Remove unessesary ::from casts

* Remove pendantic cast that i missed

* Make Builder::push_tokens accept TokenStream

* Remove stray commented out code

* Reword unclear comment on `Span` to a todo item

* Move comment closer to its intended line

* Use into instead of explicit conversion
2020-07-12 21:42:14 +10:00
Chris Wong
34a79ee706 Release 0.22 2020-06-20 19:57:51 +10:00
Byte
03e03e2e7d
Replace Span::def_site and remove #![feature(proc_macro_def_site)] () 2020-06-14 22:29:51 +10:00
AlterionX
42108c3517 Upgrade syn to 1.0.8. Upgrade matches to 0.1.8 2019-11-23 19:47:52 -06:00
Chris Wong
d0f29ae410 Change username from lfairy to lambda-fairy 2019-09-14 13:48:59 +12:00
Chris Wong
5e2c9e26a8 Release 0.21.0 2019-07-01 21:03:44 +12:00
Malthe Borch
e302ba57e0 Use syn instead of literalext () 2019-05-18 15:44:43 +12:00
Thomas Lovegrove
f3a4c298de Add implicit div class/id shorthand ()
* Add implicit div class/id shorthand

* Add newline

* Add short explanation and example of implicit div
2019-04-20 13:39:24 +12:00
Chris Wong
b86ba7af85 Use absolute paths in generated code
Closes 
2019-03-28 20:18:12 +13:00
Chris Wong
39f543c819 Rust 2018 2019-03-16 20:18:58 +13:00
Chris Wong
65874efb98 Remove redundant closures 2019-02-21 21:22:22 +13:00
Chris Wong
6de2cf1998 Release 0.20.0 2019-01-17 16:01:55 +13:00
Chris Wong
0ccb2829c9 Release 0.19.0 2018-10-20 17:15:57 +13:00
Chris Wong
61e5f9d954
Merge pull request from ivanbakel/warn_on_keyword_names
Added warning when elements have keyword names
2018-10-20 16:49:01 +13:00
Isaac van Bakel
485ee13afb Corrected formatting on keyword element warning
The formatting argument is now only passed once.
2018-10-14 12:10:24 +01:00
Chris Wong
365d0ab956 Update to rustc 1.31.0-nightly (77af31408 2018-10-11) 2018-10-12 19:26:16 +13:00
Isaac van Bakel
5a74dd0232 Added warning when elements have keyword names
Fixes .
To avoid erroneously preventing elements which are actually meant to be
called `if` from being used, this is only a warning, with a suggestion
of the template syntax.
2018-10-11 22:05:47 +01:00
Chris Wong
6aee65a6f1 Update to rustc 1.31.0-nightly (fddcd316a 2018-10-05) 2018-10-06 18:03:15 +13:00
Chris Wong
35d5204cab Update to rustc 1.30.0-nightly (9395f0af7 2018-09-02) 2018-09-03 20:01:39 +12:00
Chris Wong
f17e21423e Remove #![feature(use_extern_macros)] 2018-08-18 16:25:15 -07:00
Chris Wong
e273d897cf Parse arbitrary expressions in classes and IDs
Closes 
2018-08-13 16:15:58 -07:00
Chris Wong
8d8d5960a5 Extend AST to allow arbitrary exprs in classes and IDs 2018-08-13 15:44:04 -07:00
Chris Wong
d8d5af97f8 Span the whole class or ID in duplicate attribute errors 2018-08-12 14:12:59 +12:00
Chris Wong
3847880404 Span the whole attribute in duplicate attribute errors 2018-08-12 14:12:52 +12:00