Open noalbalint opened 1 year ago
Hello @se-panfilov, thanks for creating this package.
I noticed that your makeCss function has a small bug that causes it to incorrectly parse the value of multi-word css rules.
makeCss
For example, if I provide this message style override in the config object:
'.mini-toastr-notification__message': { display: 'inline-block', 'vertical-align': 'middle', width: '240px', 'white-space': 'pre-wrap', },
it will be parsed like so:
the problem is this line:
.replace(/(\w*-?\w*): ([\w\d .#]*),?/g, '$1: $2;')
it needs to also look for - chars. ie, it should be changed to:
-
.replace(/(\w*-?\w*): ([\w\d .#-]*),?/g, '$1: $2;')
then the css is parsed as expected:
Happy to open a PR for this but it looks like I don't have permission 🙏
Hello @se-panfilov, thanks for creating this package.
I noticed that your
makeCss
function has a small bug that causes it to incorrectly parse the value of multi-word css rules.For example, if I provide this message style override in the config object:
it will be parsed like so:
the problem is this line:
it needs to also look for
-
chars. ie, it should be changed to:then the css is parsed as expected:
Happy to open a PR for this but it looks like I don't have permission 🙏