From e8a6bb9cd3b8c643270cb3ebe0f66ace72f1f1a0 Mon Sep 17 00:00:00 2001 From: Cory Brown Date: Wed, 2 Oct 2019 19:27:18 -0600 Subject: [PATCH] fix(selector-guessing): improve guess at selector --- src/utils/tagged-template-literal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/tagged-template-literal.js b/src/utils/tagged-template-literal.js index cd0379a..f9f4b14 100644 --- a/src/utils/tagged-template-literal.js +++ b/src/utils/tagged-template-literal.js @@ -130,7 +130,7 @@ const interleave = (quasis, expressions, absolutePath) => { substitute = parseInterpolationTag(expressions[i], count, absolutePath) count += 1 // No sc tag so we guess defaults - } else if (nextChar === '{') { + } else if (nextChar === '{' || ['>', '&'].includes(prevChar)) { // Guess as selector, which shares format with `parseInterpolationTag`, but not `wrapSelector` substitute = `.sc-selector${count}` count += 1