Skip to content

Commit c175ed3

Browse files
authored
Add start and end of string anchors to identifier regex in cdl.md (#1981)
This is super minor, of course, but I think the caret helps folks understand the significance of `[$A-Za-z_]` specifically representing the starting character of the identifier name. And when one anchors the start of a string, one should also anchor the end :-) Feel free to reject and call me out as a fool :-)
1 parent 91c2c30 commit c175ed3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cds/cdl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Keywords are *case-insensitive*, but are most commonly used in lowercase notatio
6262

6363
Identifiers are *case-significant*, that is, `Foo` and `foo` would identify different things.
6464

65-
Identifiers have to comply to `/[$A-Za-z_]\w*/` or be enclosed in `![`...`]` like that:
65+
Identifiers have to comply to `/^[$A-Za-z_]\w*$/` or be enclosed in `![`...`]` like that:
6666

6767
```cds
6868
type ![Delimited Identifier] : String;

0 commit comments

Comments
 (0)