Skip to content

Commit 122a8ef

Browse files
committed
px HTML expression detection
1 parent b705d08 commit 122a8ef

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Here are a few common issues.
1919

2020
- Update to [TypeScript 3.7](https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/).
2121
- There was an error when calling commands `testString` and `showVersion`.
22+
- Code provider:
23+
- `px` HTML expression detection.
2224

2325
## [0.1.0] - 2019-11-05
2426

src/checker/providers/codeDetect.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export class CodeDetect implements IDetectProvider {
8484
return [ConfidenceLevel.Technical, 'img'];
8585
}
8686

87+
if (text.search(/\d+px/) >= 0) {
88+
return [ConfidenceLevel.Technical, 'px'];
89+
}
90+
8791
if (/ ?(>|<|\+|\*|=|\/) ?/.test(text)) {
8892
// Text with mathematical symbols.
8993
return [ConfidenceLevel.Technical, 'formula'];

0 commit comments

Comments
 (0)