Skip to content

Commit 8a4a988

Browse files
committed
Fix code examples in paramTypes docs
1 parent 201c1a4 commit 8a4a988

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/paramTypes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ You can define a regex pattern to match the custom parameters:
103103

104104
```js
105105
paramTypes: {
106-
custom: [{ regex: '\\{[a-zA-Z0-9_]+\\}' }];
106+
custom: [{ regex: '\\{[a-zA-Z0-9_]+\\}' }],
107107
}
108108
```
109109

110110
Note the double backslashes. You can get around the double-escaping problem by using `String.raw`:
111111

112112
```js
113113
paramTypes: {
114-
custom: [{ regex: String.raw`\{[a-zA-Z0-9_]+\}` }];
114+
custom: [{ regex: String.raw`\{[a-zA-Z0-9_]+\}` }],
115115
}
116116
```
117117

0 commit comments

Comments
 (0)