Skip to content

Commit 7923096

Browse files
authored
Fixed QueryParam normalization regex (#1394)
1 parent 2d2dbca commit 7923096

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
unreleased:
22
fixed bugs:
3+
- GH-1394 Fixed QueryParam normalization regex
34
- >-
45
Fixed a bug where `PropertyBase.parent` used to return grandparent for
56
non-list parent

lib/collection/query-param.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var _ = require('../util').lodash,
22

33
Property = require('./property').Property,
4+
Substitutor = require('../superstring').Substitutor,
45
PropertyList = require('./property-list').PropertyList,
56

67
E = '',
@@ -12,7 +13,7 @@ var _ = require('../util').lodash,
1213
REGEX_HASH = /#/g,
1314
REGEX_EQUALS = /=/g, // eslint-disable-line no-div-regex
1415
REGEX_AMPERSAND = /&/g,
15-
REGEX_EXTRACT_VARS = /{{[^{}]*[&#=][^{}]*}}/g,
16+
REGEX_EXTRACT_VARS = Substitutor.REGEX_EXTRACT_VARS,
1617

1718
QueryParam,
1819

lib/superstring/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ _.assign(Substitutor, /** @lends Substitutor */ {
163163
* @readOnly
164164
* @type {RegExp}
165165
*/
166-
REGEX_EXTRACT_VARS: /\{\{([^{}]*?)}}/g,
166+
REGEX_EXTRACT_VARS: /{{([^{}]*?)}}/g,
167167

168168
/**
169169
* Defines the number of times the variable substitution mechanism will repeat until all tokens are resolved

0 commit comments

Comments
 (0)