first commit
This commit is contained in:
19
node_modules/stylelint/lib/utils/blockString.mjs
generated
vendored
Normal file
19
node_modules/stylelint/lib/utils/blockString.mjs
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import beforeBlockString from './beforeBlockString.mjs';
|
||||
import hasBlock from './hasBlock.mjs';
|
||||
import rawNodeString from './rawNodeString.mjs';
|
||||
|
||||
/**
|
||||
* Return a CSS statement's block -- the string that starts and `{` and ends with `}`.
|
||||
*
|
||||
* If the statement has no block (e.g. `@import url(foo.css);`), returns an empty string.
|
||||
*
|
||||
* @param {import('postcss').Container} statement
|
||||
* @returns {string}
|
||||
*/
|
||||
export default function blockString(statement) {
|
||||
if (!hasBlock(statement)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return rawNodeString(statement).slice(beforeBlockString(statement).length);
|
||||
}
|
||||
Reference in New Issue
Block a user