Skip to content

Commit

Permalink
Fix expansion of Uri and mispelling of identifier (#6019)
Browse files Browse the repository at this point in the history
Fixes #5995
  • Loading branch information
parlough authored Aug 4, 2024
1 parent f732450 commit d063965
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/content/effective-dart/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ or `HttpSftp` for the latter.

Two-letter abbreviations and acronyms are the exception.
If both letters are capitalized in English,
then they should both stay capitalized when used in an identifer.
then they should both stay capitalized when used in an identifier.
Otherwise, capitalize it like a word.

```dart tag=good
// Longer than two letters, so always like a word:
Http // "hypertext transfer protocol"
Nasa // "national aeronautics and space administration"
Uri // "uniform resource locator"
Uri // "uniform resource identifier"
Esq // "esquire"
Ave // "avenue"
Expand All @@ -243,7 +243,7 @@ Rd // "road"
```dart tag=bad
HTTP // "hypertext transfer protocol"
NASA // "national aeronautics and space administration"
URI // "uniform resource locator"
URI // "uniform resource identifier"
esq // "esquire"
Ave // "avenue"
Expand All @@ -257,7 +257,7 @@ RD // "road"
```

When any form of abbreviation comes at the beginning
of a lowerCamelCase identifier, lowercase the identifer:
of a `lowerCamelCase` identifier, the abbreviation should be all lowercase:

```dart
var httpConnection = connect();
Expand Down

0 comments on commit d063965

Please sign in to comment.