Skip to content

Commit db25c26

Browse files
committed
fix: Remove support for 'BME' selectors.
1 parent 3fb0890 commit db25c26

File tree

1 file changed

+0
-7
lines changed
  • packages/@css-blocks/bem-to-blocks/src

1 file changed

+0
-7
lines changed

packages/@css-blocks/bem-to-blocks/src/utils.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { BemObject } from "./interface";
22

33
// regex that matches block__element--modifier pattern
44
export const R_BEM_REGEX = /^.(?:((?:[a-z0-9]+-)*[a-z0-9]+)(__(?:[a-z0-9]+-)*[a-z0-9]+)?(--(?:[a-z0-9]+-)*[a-z0-9]+)?)$/;
5-
// regex that matches block--modifier__element pattern
6-
export const R_BME_REGEX = /^.(?:((?:[a-z0-9]+-)*[a-z0-9]+)(--(?:[a-z0-9]+-)*[a-z0-9]+)?(__(?:[a-z0-9]+-)*[a-z0-9]+)?)$/;
75

86
/**
97
* function to find the LCS (longest common substring) from a string array
@@ -51,11 +49,6 @@ export function parseBemSelector(selector: string): BemObject | null {
5149
if (block || element || modifier) {
5250
return { block, element, modifier };
5351
}
54-
} else if (R_BME_REGEX.test(selector)) {
55-
const [, block, modifier, element] = R_BME_REGEX.exec(selector) || [undefined, undefined, undefined, undefined];
56-
if (block || element || modifier) {
57-
return { block, element, modifier };
58-
}
5952
}
6053
return null;
6154
}

0 commit comments

Comments
 (0)