MCPcopy
hub / github.com/webpack/webpack / stripBareMarker

Method stripBareMarker

lib/css/CssParser.js:1863–1878  ·  view source on GitHub ↗
(colon, ident, after)

Source from the content-addressed store, hash-verified

1861 * @returns {boolean} whether whitespace follows the marker
1862 */
1863 const stripBareMarker = (colon, ident, after) => {
1864 const afterIsWhitespace = Boolean(
1865 after && A.type(after) === NodeType.Whitespace
1866 );
1867 const identEnd = A.end(ident);
1868 const stripEnd =
1869 afterIsWhitespace && A.start(after) === identEnd
1870 ? A.end(after)
1871 : identEnd;
1872 if (isModules) {
1873 module.addPresentationalDependency(
1874 new ConstDependency("", [A.start(colon), stripEnd])
1875 );
1876 }
1877 return afterIsWhitespace;
1878 };
1879
1880 /**
1881 * Strip a `:local(…)` / `:global(…)` wrapper (modules only) with two source-level deps: the leading `:name(` up to the first arg, and the trailing `)` (`:local` also eats whitespace before it).

Callers

nothing calls this directly

Calls 2

typeMethod · 0.45

Tested by

no test coverage detected