Skip to content

Commit

Permalink
Fixed on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
msarca committed Aug 17, 2021
1 parent 90ec575 commit eac96c3
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Just add a `script` tag before the `head` closing tag, and you are good to go!
<!-- Other resources here -->
<!-- ... -->
<!-- Assembler CSS -->
<script src="https://unpkg.com/@asmcss/assembler@0.3.2/dist/assembler.min.js"></script>
<script src="https://unpkg.com/@asmcss/assembler/dist/assembler.min.js"></script>
</head>
<body>
<!-- Your code here -->
Expand Down Expand Up @@ -50,7 +50,7 @@ The full documentation for Assembler CSS can be found [here][documentation].
You could also install Assembler CSS as an npm package by issuing the following command:

```shell
npm install --save @asmcss/assembler
npm install @asmcss/assembler
```

Or, if you are a Yarn user
Expand Down
3 changes: 2 additions & 1 deletion dist/assembler.cjs.js

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

3 changes: 2 additions & 1 deletion dist/assembler.es.js

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

3 changes: 2 additions & 1 deletion dist/assembler.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/assembler.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": "@asmcss/assembler",
"version": "0.3.2",
"version": "0.3.3",
"main": "dist/assembler.cjs.js",
"module": "dist/assembler.es.js",
"browser": "dist/assembler.js",
Expand Down
4 changes: 3 additions & 1 deletion src/Root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

const ESCAPE_REGEX = /\\\n/g;

class RootClass {
private styles: CSSStyleDeclaration[] = null;
private cache: Map<string, string> = new Map<string, string>();
Expand Down Expand Up @@ -92,7 +94,7 @@ class RootClass {
}

let value = this.getPropertyValueFormComputedStyles('--' + property)
.replace("\\\n", "")
.replace(ESCAPE_REGEX, "")
.trim();

if (value.startsWith('"') && value.endsWith('"')) {
Expand Down

0 comments on commit eac96c3

Please sign in to comment.