Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Commit 68b4c4f

Browse files
authored
Merge pull request #28 from ramitos/rnd-selector
use unique name for each wrapped selector
2 parents 3ad3aa1 + 0f9e146 commit 68b4c4f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils/general.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// selector count
2+
let count = 0
3+
14
/**
25
* Based on https://github.com/mapbox/stylelint-processor-markdown
36
* @author @davidtheclark
@@ -45,7 +48,8 @@ const isLastLineWhitespaceOnly = (text) => {
4548
return true
4649
}
4750

48-
const wrapSelector = (content) => `.selector {${content}}\n`
51+
// eslint-disable-next-line no-return-assign
52+
const wrapSelector = (content) => `.selector${count += 1} {${content}}\n`
4953
const wrapKeyframes = (content) => `@keyframes {${content}}\n`
5054

5155
exports.wrapKeyframes = wrapKeyframes

0 commit comments

Comments
 (0)