replace "spaces" in generateTargetClass
Open
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
Currently spaces are not replaces in `generateTargetClass `
```
ChartInternal.prototype.generateTargetClass = function (targetId) {
return targetId || targetId === 0 ? ('-' + targetId).replace(/\s/g, '-') : '';
};
```
I think `/\W+/g` would be better as it would also replace spaces.
```
ChartInternal.prototype.generateTargetClass = function (targetId) {
return targetId || targetId === 0 ? ('-' + targetId).replace(/\W+/g, '-') : '';
};
```
Am I missing s.th.?
Contributor guide
Assessment
This issue has not been assessed yet.