Skip to content

Commit

Permalink
2024.01.08
Browse files Browse the repository at this point in the history
  • Loading branch information
lovedder1995 committed Jan 9, 2024
1 parent 47ae445 commit fb94a19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "php-bundler",
"version": "2.0.7",
"version": "2.0.8",
"main": "index.js",
"bin": "index.js",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions rules/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ module.exports = ({ lines, filename }) => {
if (item.includes(' : ')) {
item = item.split(' : ')[0]
if (!lines[index].trimStart().startsWith('}')) {
lines[index] = lines[index].replace(item, `"${item}"`)
lines[index] = lines[index].replace(` ${item} `, ` "${item}" `)
}
}

const startsWithANumber = item.trimStart().match(/^\d/)
if (!item.includes(' : ') && !lines[index].trimStart().startsWith('}') && !startsWithANumber) {
if (!lines[index].includes(' : ') && !lines[index].trimStart().startsWith('}') && !startsWithANumber) {
lines[index] = lines[index].replace(item, `"${item}"`)
}
}
Expand Down

0 comments on commit fb94a19

Please sign in to comment.