From 0f9e14615b7cc66319a47be25661c69e44b536f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Thu, 18 May 2017 17:55:19 +0100 Subject: [PATCH] use unique name for each wrapped selector --- src/utils/general.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/general.js b/src/utils/general.js index 0c5ba6d..800ff01 100644 --- a/src/utils/general.js +++ b/src/utils/general.js @@ -1,3 +1,6 @@ +// selector count +let count = 0 + /** * Based on https://github.com/mapbox/stylelint-processor-markdown * @author @davidtheclark @@ -45,7 +48,8 @@ const isLastLineWhitespaceOnly = (text) => { return true } -const wrapSelector = (content) => `.selector {${content}}\n` +// eslint-disable-next-line no-return-assign +const wrapSelector = (content) => `.selector${count += 1} {${content}}\n` const wrapKeyframes = (content) => `@keyframes {${content}}\n` exports.wrapKeyframes = wrapKeyframes