Skip to content

Commit 24891e1

Browse files
committed
feat(filters): add kwargs support to indent filter for Jinja2 parity
The indent filter now accepts width, first, and blank as keyword arguments in both Rust and Go, matching Jinja2's signature. #864
1 parent 4cca670 commit 24891e1

File tree

6 files changed

+117
-17
lines changed

6 files changed

+117
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All notable changes to MiniJinja are documented here.
44

55
## Unreleased
66

7+
* Added keyword argument support (`width`, `first`, `blank`) to the `indent` filter for Jinja2 compatibility in Rust and Go. #864
78
* Added support for dotted integer lookup (for example `foo.0`) in Rust and Go for Jinja compatibility. #881
89
* Added support for dotted filter and test names (including `foo . bar . baz`) for Jinja compatibility. #879
910
* Fixed string escape handling to preserve unknown escapes (such as `\s`) for Jinja compatibility in Rust and Go. #880

minijinja-go/filters/filters.go

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,9 @@ func FilterAttr(_ State, val value.Value, args []value.Value, _ map[string]value
22652265
// optional parameter determines whether to indent the first line (default: false).
22662266
// The third optional parameter determines whether to indent blank lines (default: false).
22672267
//
2268+
// Parameters can also be provided as keyword arguments for Jinja2 compatibility:
2269+
// width, first, and blank.
2270+
//
22682271
// Example:
22692272
//
22702273
// env := minijinja.NewEnvironment()
@@ -2276,35 +2279,51 @@ func FilterAttr(_ State, val value.Value, args []value.Value, _ map[string]value
22762279
// {{ yaml_content|indent(2) }}
22772280
// {{ yaml_content|indent(2, true) }}
22782281
// {{ yaml_content|indent(2, true, true) }}
2282+
// {{ yaml_content|indent(width=4, first=true, blank=false) }}
22792283
func FilterIndent(_ State, val value.Value, args []value.Value, kwargs map[string]value.Value) (value.Value, error) {
22802284
s, ok := val.AsString()
22812285
if !ok {
22822286
return val, nil
22832287
}
22842288

2285-
if len(kwargs) > 0 {
2286-
return value.Undefined(), mjerrors.NewError(mjerrors.ErrTooManyArguments, "too many keyword arguments")
2287-
}
2288-
22892289
width := 4
22902290
if len(args) > 0 {
22912291
if w, ok := args[0].AsInt(); ok {
22922292
width = int(w)
22932293
}
2294+
} else if v, ok := kwargs["width"]; ok {
2295+
if w, ok := v.AsInt(); ok {
2296+
width = int(w)
2297+
}
2298+
delete(kwargs, "width")
22942299
}
22952300

22962301
first := false
22972302
if len(args) > 1 {
22982303
if b, ok := args[1].AsBool(); ok {
22992304
first = b
23002305
}
2306+
} else if v, ok := kwargs["first"]; ok {
2307+
if b, ok := v.AsBool(); ok {
2308+
first = b
2309+
}
2310+
delete(kwargs, "first")
23012311
}
23022312

23032313
blank := false
23042314
if len(args) > 2 {
23052315
if b, ok := args[2].AsBool(); ok {
23062316
blank = b
23072317
}
2318+
} else if v, ok := kwargs["blank"]; ok {
2319+
if b, ok := v.AsBool(); ok {
2320+
blank = b
2321+
}
2322+
delete(kwargs, "blank")
2323+
}
2324+
2325+
if len(kwargs) > 0 {
2326+
return value.Undefined(), mjerrors.NewError(mjerrors.ErrTooManyArguments, "too many keyword arguments")
23082327
}
23092328

23102329
indent := strings.Repeat(" ", width)

minijinja/src/filters.rs

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,13 +1083,21 @@ mod builtins {
10831083
/// {{ global_config|indent(2,true) }} # indent whole Value with two spaces
10841084
/// {{ global_config|indent(2,true,true)}} # indent whole Value and all blank lines
10851085
/// ```
1086+
///
1087+
/// The parameters can also be provided as keyword arguments for
1088+
/// compatibility with Jinja2: `width`, `first`, and `blank`.
1089+
///
1090+
/// ```jinja
1091+
/// {{ global_config|indent(width=4, first=true, blank=false) }}
1092+
/// ```
10861093
#[cfg_attr(docsrs, doc(cfg(all(feature = "builtins"))))]
10871094
pub fn indent(
10881095
mut value: String,
1089-
width: usize,
1096+
width: Option<usize>,
10901097
indent_first_line: Option<bool>,
10911098
indent_blank_lines: Option<bool>,
1092-
) -> String {
1099+
kwargs: Kwargs,
1100+
) -> Result<String, Error> {
10931101
fn strip_trailing_newline(input: &mut String) {
10941102
if input.ends_with('\n') {
10951103
input.truncate(input.len() - 1);
@@ -1099,17 +1107,31 @@ mod builtins {
10991107
}
11001108
}
11011109

1110+
let width: usize = match width {
1111+
Some(width) => width,
1112+
None => ok!(kwargs.get::<Option<usize>>("width")).unwrap_or(4),
1113+
};
1114+
let indent_first_line: bool = match indent_first_line {
1115+
Some(v) => v,
1116+
None => ok!(kwargs.get::<Option<bool>>("first")).unwrap_or(false),
1117+
};
1118+
let indent_blank_lines: bool = match indent_blank_lines {
1119+
Some(v) => v,
1120+
None => ok!(kwargs.get::<Option<bool>>("blank")).unwrap_or(false),
1121+
};
1122+
ok!(kwargs.assert_all_used());
1123+
11021124
strip_trailing_newline(&mut value);
11031125
let indent_with = " ".repeat(width);
11041126
let mut output = String::new();
11051127
let mut iterator = value.split('\n');
1106-
if !indent_first_line.unwrap_or(false) {
1128+
if !indent_first_line {
11071129
output.push_str(iterator.next().unwrap());
11081130
output.push('\n');
11091131
}
11101132
for line in iterator {
11111133
if line.is_empty() {
1112-
if indent_blank_lines.unwrap_or(false) {
1134+
if indent_blank_lines {
11131135
output.push_str(&indent_with);
11141136
}
11151137
} else {
@@ -1118,7 +1140,7 @@ mod builtins {
11181140
output.push('\n');
11191141
}
11201142
strip_trailing_newline(&mut output);
1121-
output
1143+
Ok(output)
11221144
}
11231145

11241146
/// URL encodes a value.

minijinja/tests/inputs/filters.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ slice-fill: {{ range(10)|slice(3, '-') }}
9191
items: {{ dict(a=1)|items }}
9292
indent: {{ "foo\nbar\nbaz"|indent(2)|tojson }}
9393
indent-first-line: {{ "foo\nbar\nbaz"|indent(2, true)|tojson }}
94+
indent-kwargs-width: {{ "foo\nbar\nbaz"|indent(width=4)|tojson }}
95+
indent-kwargs-first: {{ "foo\nbar\nbaz"|indent(4, first=true)|tojson }}
96+
indent-kwargs-blank: {{ "foo\nbar\n\nbaz"|indent(4, first=false, blank=true)|tojson }}
97+
indent-kwargs-all: {{ "foo\nbar\n\nbaz"|indent(width=2, first=true, blank=true)|tojson }}
98+
indent-default: {{ "foo\nbar\nbaz"|indent|tojson }}
9499
int-abs: {{ -42|abs }}
95100
float-abs: {{ -42.5|abs }}
96101
int-round: {{ 42|round }}

minijinja/tests/snapshots/[email protected]

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
source: minijinja/tests/test_templates.rs
33
assertion_line: 137
4-
description: "lower: {{ word|lower }}\nupper: {{ word|upper }}\ntitle: {{ word|title }}\ntitle-sentence: {{ \"the bIrd, is The:word\"|title }}\ntitle-three-words: {{ three_words|title }}\ncapitalize: {{ word|capitalize }}\ncapitalize-three-words: {{ three_words|capitalize }}\nreplace: {{ word|replace(\"B\", \"th\") }}\nescape: {{ \"<\"|escape }}\ne: {{ \"<\"|e }}\ndouble-escape: {{ \"<\"|escape|escape }}\nsafe: {{ \"<\"|safe|escape }}\nlist-length: {{ list|length }}\nlist-from-list: {{ list|list }}\nlist-from-map: {{ map|list }}\nlist-from-word: {{ word|list }}\nlist-from-undefined: {{ undefined|list }}\nbool-empty-string: {{ \"\"|bool }}\nbool-non-empty-string: {{ \"hello\"|bool }}\nbool-empty-list: {{ []|bool }}\nbool-non-empty-list: {{ [42]|bool }}\nbool-undefined: {{ undefined|bool }}\nmap-length: {{ map|length }}\nstring-length: {{ word|length }}\nstring-count: {{ word|count }}\nreverse-list: {{ list|reverse }}\nreverse-string: {{ word|reverse }}\ntrim: |{{ word_with_spaces|trim }}|\ntrim-bird: {{ word|trim(\"Bd\") }}\njoin-default: {{ list|join }}\njoin-pipe: {{ list|join(\"|\") }}\njoin_string: {{ word|join('-') }}\njoin-empty-strings: {{ [undefined, \"\", \"blub\", \"\", undefined, 42]|join('|') }}\ndefault: {{ undefined|default == \"\" }}\ndefault-value: {{ undefined|default(42) }}\ndefault-value-falsy: {{ \"\"|default(\"b\", true) }}\nd: {{ undefined|d == \"\" }}\nd-value: {{ undefined|d(42) }}\nfirst-list: {{ list|first }}\nfirst-word: {{ word|first }}\nfirst-undefined: {{ []|first is undefined }}\nlast-list: {{ list|last }}\nlast-word: {{ word|last }}\nlast-undefined: {{ []|first is undefined }}\nmin: {{ other_list|min }}\nmax: {{ other_list|max }}\nsort: {{ other_list|sort }}\nsort-reverse: {{ other_list|sort(reverse=true) }}\nsort-case-insensitive: {{ [\"B\", \"a\", \"C\", \"z\"]|sort }}\nsort-case-sensitive: {{ [\"B\", \"a\", \"C\", \"z\"]|sort(case_sensitive=true) }}\nsort-case-insensitive-mixed: {{ [0, 1, \"true\", \"false\", \"True\", \"False\", true, false]|sort }}\nsort-case-sensitive-mixed: {{ [0, 1, \"true\", \"false\", \"True\", \"False\", true, false]|sort(case_sensitive=true) }}\nsort-attribute {{ objects|sort(attribute=\"name\") }}\nd: {{ undefined|d == \"\" }}\njson: {{ map|tojson }}\njson-pretty: {{ map|tojson(true) }}\njson-scary-html: {{ scary_html|tojson }}\nurlencode: {{ \"hello world/foo-bar_baz.txt\"|urlencode }}\nurlencode-kv: {{ dict(a=\"x y\", b=2, c=3, d=None)|urlencode }}\nbatch: {{ range(10)|batch(3) }}\nbatch-fill: {{ range(10)|batch(3, '-') }}\nslice: {{ range(10)|slice(3) }}\nslice-fill: {{ range(10)|slice(3, '-') }}\nitems: {{ dict(a=1)|items }}\nindent: {{ \"foo\\nbar\\nbaz\"|indent(2)|tojson }}\nindent-first-line: {{ \"foo\\nbar\\nbaz\"|indent(2, true)|tojson }}\nint-abs: {{ -42|abs }}\nfloat-abs: {{ -42.5|abs }}\nint-round: {{ 42|round }}\nfloat-round: {{ 42.5|round }}\nfloat-round-prec2: {{ 42.512345|round(2) }}\nselect-odd: {{ [1, 2, 3, 4, 5, 6]|select(\"odd\") }}\nselect-truthy: {{ [undefined, null, 0, 42, 23, \"\", \"aha\"]|select }}\nreject-truthy: {{ [undefined, null, 0, 42, 23, \"\", \"aha\"]|reject }}\nreject-odd: {{ [1, 2, 3, 4, 5, 6]|reject(\"odd\") }}\nselect-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|selectattr(\"active\") }}\nreject-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|rejectattr(\"active\") }}\nselect-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|selectattr(\"key\", \"even\") }}\nreject-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|rejectattr(\"key\", \"even\") }}\nmap-maps: {{ [-1, -2, 3, 4, -5]|map(\"abs\") }}\nmap-attr: {{ [dict(a=1), dict(a=2), {}]|map(attribute='a', default=None) }}\nmap-attr-undefined: {{ [dict(a=1), dict(a=2), {}]|map(attribute='a', default=definitely_undefined) }}\nmap-attr-deep: {{ [dict(a=[1]), dict(a=[2]), dict(a=[])]|map(attribute='a.0', default=None) }}\nmap-attr-int: {{ [[1], [1, 2]]|map(attribute=1, default=999) }}\nattr-filter: {{ map|attr(\"a\") }}\nunique-filter: {{ [1, 1, 1, 4, 3, 0, 0, 5]|unique }}\nunique-filter-ci: {{ [\"a\", \"A\", \"b\", \"c\", \"b\", \"D\", \"d\"]|unique }}\nunique-filter-cs: {{ [\"a\", \"A\", \"b\", \"c\", \"b\", \"D\", \"d\"]|unique(case_sensitive=true) }}\nunique-attr-filter: {{ [{'x': 1}, {'x': 1, 'y': 2}, {'x': 2}]|unique }}\npprint-filter: {{ objects|pprint }}\nint-filter: {{ true|int }}, {{ \"42\"|int }}, {{ \"-23\"|int }}, {{ 42.0|int }}, {{ 42.42|int }}, {{ \"42.42\"|int }}\nfloat-filter: {{ true|float }}, {{ \"42\"|float }}, {{ \"-23.5\"|float }}, {{ 42.5|float }}\nsplit: {{ three_words|split|list }}\nsplit-at-and: {{ three_words|split(\" and \")|list }}\nsplit-n-ws: {{ three_words|split(none, 1)|list }}\nsplit-n-d: {{ three_words|split(\"d\", 1)|list }}\nsplit-n-ws-filter-empty: {{ \" foo bar baz \"|split(none, 1)|list }}\nsum: {{ range(10)|sum }}\nsum-empty: {{ []|sum }}\nsum-float: {{ [0.5, 1.0]|sum }}\nlines: {{ \"foo\\nbar\\r\\nbaz\"|lines }}\nstring: {{ [1|string, 2|string] }}\nchain-lists: {{ list|chain(list2)|list }}\nchain-multiple: {{ list|chain(list2, list3)|list }}\nchain-maps: {{ map|chain(map2) }}\nchain-and-length: {{ list|chain(list2)|length }}\nchain-iteration: {% for item in list|chain(list2) %}{{ item }}{% if not loop.last %},{% endif %}{% endfor %}\nchain-indexing: {{ (list|chain(list2))[4] }}\nzip-lists: {{ list|zip(list2)|list }}\nzip-multiple: {{ list|zip(list2, list3)|list }}\nzip-different-lengths: {{ list|zip(other_list)|list }}\nzip-iteration: {% for a, b in list|zip(list2) %}{{ a }}-{{ b }}{% if not loop.last %},{% endif %}{% endfor %}\nzip-empty: {{ []|zip(list)|list }}\nzip-single: {{ list|zip()|list }}"
4+
description: "lower: {{ word|lower }}\nupper: {{ word|upper }}\ntitle: {{ word|title }}\ntitle-sentence: {{ \"the bIrd, is The:word\"|title }}\ntitle-three-words: {{ three_words|title }}\ncapitalize: {{ word|capitalize }}\ncapitalize-three-words: {{ three_words|capitalize }}\nreplace: {{ word|replace(\"B\", \"th\") }}\nescape: {{ \"<\"|escape }}\ne: {{ \"<\"|e }}\ndouble-escape: {{ \"<\"|escape|escape }}\nsafe: {{ \"<\"|safe|escape }}\nlist-length: {{ list|length }}\nlist-from-list: {{ list|list }}\nlist-from-map: {{ map|list }}\nlist-from-word: {{ word|list }}\nlist-from-undefined: {{ undefined|list }}\nbool-empty-string: {{ \"\"|bool }}\nbool-non-empty-string: {{ \"hello\"|bool }}\nbool-empty-list: {{ []|bool }}\nbool-non-empty-list: {{ [42]|bool }}\nbool-undefined: {{ undefined|bool }}\nmap-length: {{ map|length }}\nstring-length: {{ word|length }}\nstring-count: {{ word|count }}\nreverse-list: {{ list|reverse }}\nreverse-string: {{ word|reverse }}\ntrim: |{{ word_with_spaces|trim }}|\ntrim-bird: {{ word|trim(\"Bd\") }}\njoin-default: {{ list|join }}\njoin-pipe: {{ list|join(\"|\") }}\njoin_string: {{ word|join('-') }}\njoin-empty-strings: {{ [undefined, \"\", \"blub\", \"\", undefined, 42]|join('|') }}\ndefault: {{ undefined|default == \"\" }}\ndefault-value: {{ undefined|default(42) }}\ndefault-value-falsy: {{ \"\"|default(\"b\", true) }}\nd: {{ undefined|d == \"\" }}\nd-value: {{ undefined|d(42) }}\nfirst-list: {{ list|first }}\nfirst-word: {{ word|first }}\nfirst-undefined: {{ []|first is undefined }}\nlast-list: {{ list|last }}\nlast-word: {{ word|last }}\nlast-undefined: {{ []|first is undefined }}\nmin: {{ other_list|min }}\nmax: {{ other_list|max }}\nsort: {{ other_list|sort }}\nsort-reverse: {{ other_list|sort(reverse=true) }}\nsort-case-insensitive: {{ [\"B\", \"a\", \"C\", \"z\"]|sort }}\nsort-case-sensitive: {{ [\"B\", \"a\", \"C\", \"z\"]|sort(case_sensitive=true) }}\nsort-case-insensitive-mixed: {{ [0, 1, \"true\", \"false\", \"True\", \"False\", true, false]|sort }}\nsort-case-sensitive-mixed: {{ [0, 1, \"true\", \"false\", \"True\", \"False\", true, false]|sort(case_sensitive=true) }}\nsort-attribute {{ objects|sort(attribute=\"name\") }}\nd: {{ undefined|d == \"\" }}\njson: {{ map|tojson }}\njson-pretty: {{ map|tojson(true) }}\njson-scary-html: {{ scary_html|tojson }}\nurlencode: {{ \"hello world/foo-bar_baz.txt\"|urlencode }}\nurlencode-kv: {{ dict(a=\"x y\", b=2, c=3, d=None)|urlencode }}\nbatch: {{ range(10)|batch(3) }}\nbatch-fill: {{ range(10)|batch(3, '-') }}\nslice: {{ range(10)|slice(3) }}\nslice-fill: {{ range(10)|slice(3, '-') }}\nitems: {{ dict(a=1)|items }}\nindent: {{ \"foo\\nbar\\nbaz\"|indent(2)|tojson }}\nindent-first-line: {{ \"foo\\nbar\\nbaz\"|indent(2, true)|tojson }}\nindent-kwargs-width: {{ \"foo\\nbar\\nbaz\"|indent(width=4)|tojson }}\nindent-kwargs-first: {{ \"foo\\nbar\\nbaz\"|indent(4, first=true)|tojson }}\nindent-kwargs-blank: {{ \"foo\\nbar\\n\\nbaz\"|indent(4, first=false, blank=true)|tojson }}\nindent-kwargs-all: {{ \"foo\\nbar\\n\\nbaz\"|indent(width=2, first=true, blank=true)|tojson }}\nindent-default: {{ \"foo\\nbar\\nbaz\"|indent|tojson }}\nint-abs: {{ -42|abs }}\nfloat-abs: {{ -42.5|abs }}\nint-round: {{ 42|round }}\nfloat-round: {{ 42.5|round }}\nfloat-round-prec2: {{ 42.512345|round(2) }}\nselect-odd: {{ [1, 2, 3, 4, 5, 6]|select(\"odd\") }}\nselect-truthy: {{ [undefined, null, 0, 42, 23, \"\", \"aha\"]|select }}\nreject-truthy: {{ [undefined, null, 0, 42, 23, \"\", \"aha\"]|reject }}\nreject-odd: {{ [1, 2, 3, 4, 5, 6]|reject(\"odd\") }}\nselect-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|selectattr(\"active\") }}\nreject-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|rejectattr(\"active\") }}\nselect-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|selectattr(\"key\", \"even\") }}\nreject-attr: {{ [dict(active=true, key=1), dict(active=false, key=2)]|rejectattr(\"key\", \"even\") }}\nmap-maps: {{ [-1, -2, 3, 4, -5]|map(\"abs\") }}\nmap-attr: {{ [dict(a=1), dict(a=2), {}]|map(attribute='a', default=None) }}\nmap-attr-undefined: {{ [dict(a=1), dict(a=2), {}]|map(attribute='a', default=definitely_undefined) }}\nmap-attr-deep: {{ [dict(a=[1]), dict(a=[2]), dict(a=[])]|map(attribute='a.0', default=None) }}\nmap-attr-int: {{ [[1], [1, 2]]|map(attribute=1, default=999) }}\nattr-filter: {{ map|attr(\"a\") }}\nunique-filter: {{ [1, 1, 1, 4, 3, 0, 0, 5]|unique }}\nunique-filter-ci: {{ [\"a\", \"A\", \"b\", \"c\", \"b\", \"D\", \"d\"]|unique }}\nunique-filter-cs: {{ [\"a\", \"A\", \"b\", \"c\", \"b\", \"D\", \"d\"]|unique(case_sensitive=true) }}\nunique-attr-filter: {{ [{'x': 1}, {'x': 1, 'y': 2}, {'x': 2}]|unique }}\npprint-filter: {{ objects|pprint }}\nint-filter: {{ true|int }}, {{ \"42\"|int }}, {{ \"-23\"|int }}, {{ 42.0|int }}, {{ 42.42|int }}, {{ \"42.42\"|int }}\nfloat-filter: {{ true|float }}, {{ \"42\"|float }}, {{ \"-23.5\"|float }}, {{ 42.5|float }}\nsplit: {{ three_words|split|list }}\nsplit-at-and: {{ three_words|split(\" and \")|list }}\nsplit-n-ws: {{ three_words|split(none, 1)|list }}\nsplit-n-d: {{ three_words|split(\"d\", 1)|list }}\nsplit-n-ws-filter-empty: {{ \" foo bar baz \"|split(none, 1)|list }}\nsum: {{ range(10)|sum }}\nsum-empty: {{ []|sum }}\nsum-float: {{ [0.5, 1.0]|sum }}\nlines: {{ \"foo\\nbar\\r\\nbaz\"|lines }}\nstring: {{ [1|string, 2|string] }}\nchain-lists: {{ list|chain(list2)|list }}\nchain-multiple: {{ list|chain(list2, list3)|list }}\nchain-maps: {{ map|chain(map2) }}\nchain-and-length: {{ list|chain(list2)|length }}\nchain-iteration: {% for item in list|chain(list2) %}{{ item }}{% if not loop.last %},{% endif %}{% endfor %}\nchain-indexing: {{ (list|chain(list2))[4] }}\nzip-lists: {{ list|zip(list2)|list }}\nzip-multiple: {{ list|zip(list2, list3)|list }}\nzip-different-lengths: {{ list|zip(other_list)|list }}\nzip-iteration: {% for a, b in list|zip(list2) %}{{ a }}-{{ b }}{% if not loop.last %},{% endif %}{% endfor %}\nzip-empty: {{ []|zip(list)|list }}\nzip-single: {{ list|zip()|list }}"
55
info:
66
word: Bird
77
word_with_spaces: " Spacebird\n"
@@ -104,6 +104,11 @@ slice-fill: [[0, 1, 2, 3], [4, 5, 6, "-"], [7, 8, 9, "-"]]
104104
items: [["a", 1]]
105105
indent: "foo\n bar\n baz"
106106
indent-first-line: " foo\n bar\n baz"
107+
indent-kwargs-width: "foo\n bar\n baz"
108+
indent-kwargs-first: " foo\n bar\n baz"
109+
indent-kwargs-blank: "foo\n bar\n \n baz"
110+
indent-kwargs-all: " foo\n bar\n \n baz"
111+
indent-default: "foo\n bar\n baz"
107112
int-abs: 42
108113
float-abs: 42.5
109114
int-round: 42

0 commit comments

Comments
 (0)