mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-27 13:00:57 +00:00
Allow to ignore jinja code example check
This commit is contained in:
parent
1da2840071
commit
e8d2391d48
@ -104,7 +104,7 @@ Output:
|
||||
### default
|
||||
[#default]: #default
|
||||
|
||||
```text
|
||||
```jinja,ignore
|
||||
{{ variable_or_expression | default(default_value) }}
|
||||
{{ variable_or_expression | default(default_value, [[boolean =] true]) }}
|
||||
```
|
||||
@ -285,7 +285,7 @@ enabled by <code>"alloc"</code><br/>
|
||||
enabled by <code>"default"</code>
|
||||
</blockquote>
|
||||
|
||||
```text
|
||||
```jinja,ignore
|
||||
{{ "format_string" | format([variables ...]) }}
|
||||
```
|
||||
|
||||
@ -468,7 +468,7 @@ hello
|
||||
### `pluralize`
|
||||
[#pluralize]: #pluralize
|
||||
|
||||
```text
|
||||
```jinja,ignore
|
||||
{{ integer | pluralize }}
|
||||
{{ integer | pluralize([singular = ""], [plural = "s"]) }}
|
||||
```
|
||||
|
@ -39,6 +39,9 @@ fn check_markdown(file: &Path, errors: &mut usize) {
|
||||
if !label.contains("jinja") {
|
||||
continue;
|
||||
}
|
||||
if label.split(",").any(|part| part == "ignore") {
|
||||
continue;
|
||||
}
|
||||
let expects_error = label.split(",").any(|part| part == "error");
|
||||
let has_jinja = label.split(",").any(|part| part == "jinja");
|
||||
if !has_jinja {
|
||||
|
Loading…
x
Reference in New Issue
Block a user