Allow {q} placeholders with range expressions

e.g. {q:1}, {q:2..}
This commit is contained in:
Junegunn Choi
2025-01-27 15:40:21 +09:00
parent 2f8a72a42a
commit a2aa1a156c
6 changed files with 49 additions and 34 deletions

View File

@@ -484,7 +484,12 @@ func TestParsePlaceholder(t *testing.T) {
// III. query type placeholder
// query flag is not removed after parsing, so it gets doubled
// while the double q is invalid, it is useful here for testing purposes
`{q}`: `{qq}`,
`{q}`: `{qq}`,
`{q:1}`: `{qq:1}`,
`{q:2..}`: `{qq:2..}`,
`{q:..}`: `{qq:..}`,
`{q:2..-1}`: `{qq:2..-1}`,
`{q:s2..-1}`: `{sqq:2..-1}`, // FIXME
// IV. escaping placeholder
`\{}`: `{}`,