diff --git a/docs/revsets.md b/docs/revsets.md index 609ef808c..2240f6aea 100644 --- a/docs/revsets.md +++ b/docs/revsets.md @@ -407,10 +407,10 @@ revsets (expressions) as arguments. ## String patterns -Functions that perform string matching support the following pattern syntax: +Functions that perform string matching support the following pattern syntax (the +quotes are optional): -* `"string"`, or `string` (the quotes are optional), or `substring:"string"`: - Matches strings that contain `string`. +* `"string"` or `substring:"string"`: Matches strings that contain `string`. * `exact:"string"`: Matches strings exactly equal to `string`. * `glob:"pattern"`: Matches strings with Unix-style shell [wildcard `pattern`](https://docs.rs/glob/latest/glob/struct.Pattern.html). diff --git a/lib/src/fileset.pest b/lib/src/fileset.pest index 534198631..c252e51b7 100644 --- a/lib/src/fileset.pest +++ b/lib/src/fileset.pest @@ -61,7 +61,6 @@ function_arguments = { | "" } -// TODO: change rhs to string_literal to require quoting? #2101 string_pattern = { strict_identifier ~ pattern_kind_op diff --git a/lib/src/revset.pest b/lib/src/revset.pest index 26c7a2f49..54b0d93b0 100644 --- a/lib/src/revset.pest +++ b/lib/src/revset.pest @@ -88,7 +88,6 @@ formal_parameters = { | "" } -// TODO: change rhs to string_literal to require quoting? #2101 string_pattern = { strict_identifier ~ pattern_kind_op ~ symbol } primary = {