Skip to content

Commit 8d50e1d

Browse files
committed
Improvement in camel case variable detection
1 parent 122a8ef commit 8d50e1d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Here are a few common issues.
2121
- There was an error when calling commands `testString` and `showVersion`.
2222
- Code provider:
2323
- `px` HTML expression detection.
24+
- Improvement in camel case variable detection.
2425

2526
## [0.1.0] - 2019-11-05
2627

src/helpers/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function removeSentenceQuotes(text: string | undefined): string | undefin
3333
}
3434

3535
export function isCamelCase(text: string): boolean {
36-
return /^[a-z][^\s]+$/.test(text);
36+
return /^([a-z][^A-Z\s]+)([A-Z][^A-Z\s]*)+$/.test(text);
3737
}
3838

3939
export function isPascalCase(text: string): boolean {

0 commit comments

Comments
 (0)