TileLayer feature: add space to character regex for template to allow Object keys with it (#7216)

This commit is contained in:
Lubomír Bucek
2020-11-18 15:25:14 +01:00
committed by GitHub
parent f22422a402
commit 92ff0a1461
2 changed files with 3 additions and 2 deletions

View File

@ -229,9 +229,10 @@ describe('Util', function () {
}).to.throwError();
});
it('allows underscores and dashes in placeholders', function () {
it('allows underscores, dashes and spaces in placeholders', function () {
expect(L.Util.template('{nice_stuff}', {'nice_stuff': 'foo'})).to.eql('foo');
expect(L.Util.template('{-y}', {'-y': 1})).to.eql('1');
expect(L.Util.template('{Day Of Month}', {'Day Of Month': 30})).to.eql('30');
});
});