Print selector-string (#1759)
parent
4b727daa54
commit
2a33309e3d
|
@ -322,8 +322,8 @@ function parseNestedCSS(node) {
|
|||
try {
|
||||
node.value = parseValue(node.value);
|
||||
} catch (e) {
|
||||
const line = +e.toString().match(/line: ([0-9]+)/)[1];
|
||||
const column = +e.toString().match(/column ([0-9]+)/)[1];
|
||||
const line = +(e.toString().match(/line: ([0-9]+)/) || [1, 1])[1];
|
||||
const column = +(e.toString().match(/column ([0-9]+)/) || [0, 0])[1];
|
||||
throw createError(
|
||||
e.toString(),
|
||||
node.source.start.line + line - 1,
|
||||
|
|
|
@ -2576,6 +2576,9 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
case "selector-comment": {
|
||||
return n.value;
|
||||
}
|
||||
case "selector-string": {
|
||||
return n.value;
|
||||
}
|
||||
case "selector-tag": {
|
||||
return n.value;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`string.css 1`] = `
|
||||
:not(".public/basics/positioning") {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
:not(".public/basics/positioning") {
|
||||
}
|
||||
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, { parser: "postcss" });
|
|
@ -0,0 +1,2 @@
|
|||
:not(".public/basics/positioning") {
|
||||
}
|
Loading…
Reference in New Issue