Skip to content

Commit

Permalink
2.6.0.beta1: trailing colons fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
houd1ni committed Apr 9, 2019
1 parent a00451c commit a387389
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"test:report": "nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && codecov",
"test:lazy": "ava",
"gentypes": "dts-bundle-generator -o dist/bundle.d.ts src/main.ts",
"dev": "cross-env NODE_ENV=development rollup -c",
"dev": "cross-env NODE_ENV=development BUILD=es rollup -c",
"prod:cjs": "cross-env NODE_ENV=production BUILD=cjs rollup -c",
"prod:es": "cross-env NODE_ENV=production BUILD=es rollup -c",
"prod": "npm run gentypes && npm run prod:es && npm run prod:cjs"
},
"version": "2.6.0beta.0",
"version": "2.6.0beta.1",
"ava": {
"files": [
"./test/specs/*.ts"
Expand Down
2 changes: 1 addition & 1 deletion src/css-lit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const analyseLine = (() => {
const ruleRE = /^([\w-]+)(: *| +)(.*)$/
const selectorRE = /^(([@>\*\.:&\(\)\^="\-\[\]]+).*[ ,]*)+:?$/
const delimRE = /\s*,\s*/g
const trailingColonRE = /(.*):[\n\r]/g
const trailingColonRE = /(.*):$/
return (levels: AnyObject[], line: string, names: string[]) => {
let groups: string[]
const current = last(levels)
Expand Down
12 changes: 12 additions & 0 deletions test/specs/lit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ test('lit-css', (t) => {
'& .inner': {
left: 42
}
},
cls: {
'& .red': {
padding: 5
},
'& .green': {
padding: 5
}
}
}
const rule = () => css`
Expand All @@ -31,6 +39,10 @@ test('lit-css', (t) => {
left: 42
}
}
.cls: {
.red, .green: {
padding: 5
}
`

ff(t.deepEqual(rule(), obj))
Expand Down

0 comments on commit a387389

Please sign in to comment.