Skip to content

Commit 341b185

Browse files
authored
add '-' to symbolAndNumberRegex (#34)
1 parent c14242e commit 341b185

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/snapshot.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from './types';
99

1010
let _id = 1;
11-
const symbolAndNumberRegex = RegExp('[^a-z1-6]');
11+
const symbolAndNumberRegex = RegExp('[^a-z1-6\-]');
1212

1313
function genId(): number {
1414
return _id++;
@@ -32,9 +32,9 @@ function getCssRulesString(s: CSSStyleSheet): string | null {
3232
const rules = s.rules || s.cssRules;
3333
return rules
3434
? Array.from(rules).reduce(
35-
(prev, cur) => prev + getCssRuleString(cur),
36-
'',
37-
)
35+
(prev, cur) => prev + getCssRuleString(cur),
36+
'',
37+
)
3838
: null;
3939
} catch (error) {
4040
return null;

0 commit comments

Comments
 (0)