aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add test case for matching on Option<bool>Libravatar Restioson2021-08-252-0/+26
|
* Parse boolean literals in assignment targetsLibravatar René Kijewski2021-08-252-3/+27
| | | | | | | | 268d825 introduced a regression that made matching against boolean literals impossible. E.g. "true" was interpreted as the variable "r#true". This PR fixes the problem. The bug was reported by @Restioson in issue #531.
* Upgrade to nom 7Libravatar Dirkjan Ochtman2021-08-212-6/+10
|
* Bump version numbers in anticipation of beta releaseLibravatar Dirkjan Ochtman2021-08-2110-14/+14
|
* Enable config support in askama_shared build dependencyLibravatar Jonas Platte2021-08-072-1/+3
| | | | Fixes using askama with the new Cargo feature resolver and a configuration file.
* Update mime_guess dependencyLibravatar Dirkjan Ochtman2021-08-051-1/+1
|
* Remove the askama_iron integrationLibravatar Dirkjan Ochtman2021-08-0511-98/+0
| | | | | | | This web framework seems not to have been updated for quite a while, and its current version appears to depend on vulnerable crates. Remove it for now. If someone wants to fix up Iron upstream and reinstate this, I'd be happy to review your PR.
* Upgrade nom to 6.2.1 (bitvec & funty issue)Libravatar Lee Hambley2021-08-021-2/+1
|
* Issue #379 was fixedLibravatar René Kijewski2021-07-303-0/+38
| | | | | | | | This PR adds the tests by @msrd0 <git@msrd0.de> that failed before. The error was fixed somewhen between f23162a and now, so these tests serve to prevent regressions in the future. I simplified the tests very slightly to omit whitespaces in the output.
* Better error messages using cutsLibravatar René Kijewski2021-07-303-131/+205
|
* Use "target()" to parse "when" blockLibravatar René Kijewski2021-07-308-253/+161
| | | | | | | | | | | | `target()` as used in parsing "let" and "if let" implements parsing nested tuples and structs. But it does not implement parsing literals. The functions `match_variant()` and `with_parameters()` as used in parsing "when" blocks do not implement parsing nested structs, but it implements parsing literals. This PR combines `match_variant()` and `with_parameters()` into `target()`, so that all `{%when%}` support nested structs, too.
* Allow omitting "with" keyword in match blocksLibravatar René Kijewski2021-07-302-1/+18
| | | | | | | | | Askama uses the syntax `{% when Variant with (parameters) %}` in `{% match %}` blocks. This is done because Askama does not implement the whole pattern matching of Rust's `match` statements. This PR wants to bring Askama a step closer Rust's matching, so the "with" keyword should not be needed anymore.
* Allow using "with" keyword in "let" statementsLibravatar René Kijewski2021-07-302-0/+15
| | | | | | | | Askama uses the syntax `{% when Variant with (parameters) %}` in `{% match %}` blocks. This change allows the optional use of the keyword "with" in "let" and "if let" statements, too.
* Silence clippy warning from Rust 1.54Libravatar Dirkjan Ochtman2021-07-301-0/+1
|
* Implement destructoring of structsLibravatar René Kijewski2021-07-053-8/+166
| | | | | This PR implements the destructoring of structs on the lhs of "let" and "for" statements.
* Add "destructoring tuple in loop" testLibravatar René Kijewski2021-07-051-0/+69
|
* Add tuple destructoring testsLibravatar René Kijewski2021-07-052-0/+17
|
* Parse nested tuples in "let" statement lhsLibravatar René Kijewski2021-07-052-17/+35
|
* Add loop variable shadowing testLibravatar René Kijewski2021-07-051-0/+21
|
* Reduce code duplication for writing targetsLibravatar René Kijewski2021-07-051-22/+9
| | | | | This change also fixes a bug in the loop generator, which failed for shadowed variables.
* Move logic where target shadows or declares a variable into methodLibravatar René Kijewski2021-07-051-23/+33
|
* Remove needless deref, only to ref it a few lines downLibravatar René Kijewski2021-07-051-4/+4
|
* Remove duplicated code in generatorLibravatar René Kijewski2021-07-051-17/+1
|
* Prepare generator::visit_target() for nested targetsLibravatar René Kijewski2021-07-051-4/+2
| | | | | | | | By now only non-nested tuples are accepted by the parser, but this will change. This change makes visit_target() call itself for items in a tuple. So enable the function to call itself, I needed to fix the lifetime annotation, because the references inside a Target instance may outlife a reference to instance itself.
* Replace rust_macro test to work on nightlyLibravatar René Kijewski2021-07-022-14/+18
| | | | | | | | | | | | | | | | The current rust_test uses `stringify!()`. The documentation gives us the warning: > Note that the expanded results of the input tokens may change in the > future. You should be careful if you rely on the output. In the current nightly rust the result was indeed changed, so the test not fails. This PR replaces the test with another macro, that does not depend on `stringify!()`. Closes issue #504.
* Fix expected error message for missing fileLibravatar René Kijewski2021-07-026-0/+16
| | | | | | | | | rust-lang/rust#82069 made error message that stem macro invocations more verbose. Since Rust 1.54 (currently in beta) the message includes the name of the offending macro. This PR uses version_check to select the appropriate expected error message.
* Stop eliding lifetimes in pathsLibravatar Dirkjan Ochtman2021-07-0115-105/+140
|
* Add "if let" testsLibravatar René Kijewski2021-07-015-0/+119
|
* Implement "if let" statementLibravatar René Kijewski2021-07-012-17/+54
|
* Use "if let Some(_)" instead of matchLibravatar René Kijewski2021-07-011-21/+18
|
* Move visit_match_params into its own methodLibravatar René Kijewski2021-07-011-38/+42
|
* Fix a clippy::needless-borrow warning in askama_sharedLibravatar René Kijewski2021-07-011-1/+1
|
* Added loop testsLibravatar vallentin2021-06-231-0/+83
|
* Fixed loop generator when accessing field (fixes 494)Libravatar vallentin2021-06-231-0/+6
|
* Fix code generation for macro calls that store args in variables.Libravatar Ryan Kelly2021-06-223-1/+23
|
* Support rocket 0.5.0-rc.1 based on @flo-l's PR (#495)Libravatar Shritesh Bhattarai2021-06-154-14/+10
| | | See #412 for earlier iteration.
* Fix needless borrowingLibravatar Dirkjan Ochtman2021-06-142-6/+6
|
* Remove forward-slash escape (#486)Libravatar Alex Wennerberg2021-05-173-7/+3
| | | | | | | | | | | | | | | This was based off of the OWASP XSS prevention cheat sheet -- https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#output-encoding-rules-summary However, there isn't really any attack vector based on forward slash alone, and it's being removed in the next version of that document. > There is no proof that escaping forward slash will improve > defense against XSS, if all other special characters are escaped > properly, but it forces developers to use non-standard implementation of > the HTML escaping, what increases the risk of the mistake and makes the > implementation harder. https://github.com/OWASP/CheatSheetSeries/pull/516
* Fixed not found in scope errorLibravatar vallentin2021-04-291-1/+1
|
* Tweak dependabot ignore settingsLibravatar Dirkjan Ochtman2021-04-291-9/+1
|
* Add section to README for IDE plugins (#474)Libravatar SamJakob2021-04-291-0/+1
|
* Upgrade to GitHub-native DependabotLibravatar dependabot-preview[bot]2021-04-291-0/+24
|
* Use raw identifiers for identifiers which collide with Rust keywords (#476)Libravatar SciStarterOwner2021-04-211-4/+84
| | | Co-authored-by: Daniel Arbuckle <djarb@highenergymagic.org>
* Eliminate common tails from branchesLibravatar Dirkjan Ochtman2021-04-132-8/+4
|
* askama_tide: suppress clippy::from-over-into lintLibravatar Dirkjan Ochtman2021-03-301-0/+2
|
* Use mem::take() where applicableLibravatar Dirkjan Ochtman2021-03-301-2/+2
|
* Rename test types to PascalCaseLibravatar Dirkjan Ochtman2021-03-302-10/+10
|
* updated the book to describe the new paragraphbreaks filterLibravatar mbuscemi2021-03-221-0/+18
|
* added paragraphbreaks functionLibravatar mbuscemi2021-03-221-1/+30
|
* askama_gotham: bump version to 0.12.0Libravatar Dirkjan Ochtman2021-03-221-1/+1
|