Skip to content

Commit

Permalink
0.37.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanchuan committed Sep 15, 2023
1 parent 0389b44 commit 586a217
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.37.2

* Fix viewBox padding calculation.
* Fix CSS parser to read % as an unit value for expressions like `$%(10)`.
* Change `@unicode` to `@code` internally.

<br /> <br />



## 0.37.1

* Fix variable orders inside `@svg()`.
Expand Down
6 changes: 3 additions & 3 deletions css-doodle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1497,10 +1497,10 @@
func.arguments = args;
func.variables = variables;
break;
} else if (/[0-9a-zA-Z_\-.]/.test(c)) {
} else if (/[0-9a-zA-Z_\-.%]/.test(c)) {
name += c;
}
if (!has_argument && next !== '(' && !/[0-9a-zA-Z_\-.]/.test(next)) {
if (!has_argument && next !== '(' && !/[0-9a-zA-Z_\-.%]/.test(next)) {
break;
}
it.next();
Expand Down Expand Up @@ -1569,7 +1569,7 @@
}
break;
}
else if ((c === '@' || c === '$') && /[\w-\(]/.test(it.curr(1))) {
else if ((c === '@' || c === '$') && /[\w-\(%]/.test(it.curr(1))) {
if (text.value.length) {
value[idx].push(text);
text = Tokens.text();
Expand Down
2 changes: 1 addition & 1 deletion css-doodle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css-doodle",
"version": "0.37.1",
"version": "0.37.2",
"description": "A web component for drawing patterns with CSS",
"main": "css-doodle.js",
"scripts": {
Expand Down

0 comments on commit 586a217

Please sign in to comment.