Skip to content

Commit 52388db

Browse files
authored
Merge pull request stylelint#52 from gucong3000/v0361
V0361
2 parents 26f6338 + e34c981 commit 52388db

File tree

7 files changed

+390
-4
lines changed

7 files changed

+390
-4
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock = false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-jsx",
3-
"version": "0.36.0",
3+
"version": "0.36.1",
44
"description": "PostCSS syntax for parsing CSS in JS literals",
55
"repository": {
66
"type": "git",

template-parser-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
const Literal = require("./literal");
3-
const isLiteral = token => token[0] === "word" && /^\$\{.*\}$/.test(token[1]);
3+
const isLiteral = token => token[0] === "word" && /^\$\{[\s\S]*\}$/.test(token[1]);
44
function literal (start) {
55
if (!isLiteral(start)) {
66
return;

test/css-in-js.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe("CSS in JS", () => {
3737
`;
3838
return postcss([
3939
autoprefixer({
40-
browsers: ["Chrome > 10"],
40+
overrideBrowserslist: ["Chrome > 10"],
4141
}),
4242
]).process(
4343
code,
@@ -141,6 +141,7 @@ describe("CSS in JS", () => {
141141
describe("objectify for css", () => {
142142
cases.each((name, css) => {
143143
if (name === "bom.css") return;
144+
if (name === "custom-properties.css") return;
144145

145146
it("objectStringifier " + name, () => {
146147
const root = postcss.parse(css);

test/fixtures/interpolation-content.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,29 @@ export const ButtonStyled4 = styled.button`
2525
color: red;
2626
${buttonStyles};
2727
`;
28+
29+
export const ButtonStyled5 = styled.button`
30+
${buttonStyles
31+
}
32+
color: red;
33+
`;
34+
35+
export const ButtonStyled6 = styled.button`
36+
${buttonStyles
37+
};
38+
color: red;
39+
`;
40+
41+
export const ButtonStyled7 = styled.button`
42+
;
43+
color: red;
44+
${buttonStyles
45+
}
46+
`;
47+
48+
export const ButtonStyled8 = styled.button`
49+
;
50+
color: red;
51+
${buttonStyles
52+
};
53+
`;

0 commit comments

Comments
 (0)