diff --git a/src/lib/defaultExtractor.js b/src/lib/defaultExtractor.js index 282cc38bc7d0..0751c1acba7e 100644 --- a/src/lib/defaultExtractor.js +++ b/src/lib/defaultExtractor.js @@ -80,12 +80,18 @@ function* buildRegExps(context) { // This is here to provide special support for the `@` variant regex.pattern([/@\[[^\s"'`]+\](\/[^\s"'`]+)?/, separator]), + // With variant modifier (e.g.: group-[..]/modifier) + regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s"'`]+\]\/\w+/, separator]), + regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/, separator]), regex.pattern([/[^\s"'`\[\\]+/, separator]), ]), // With quotes allowed regex.any([ + // With variant modifier (e.g.: group-[..]/modifier) + regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s`]+\]\/\w+/, separator]), + regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s`]+\]/, separator]), regex.pattern([/[^\s`\[\\]+/, separator]), ]),