Open jalberto-ghub opened 4 years ago
If the CSS file contains the definitions like this:
.icofont-spanner:before { content: "\eff1"; }
The parsing of the files breaks because the code will not split correctly. After much debugging had to do the following to solve it:
TNSFontIconModule.forRoot({ 'icofont': require('../fonts/icofont-ngx.css').default.replace(/[\r\n]+/g, ' ' ) }),
I.e. remove all the new lines while loading the file, so that it can be parsed by the current code. The parsing code should take care of it.
To make the issue more clear, the current code is using:
let pair = set.replace(/ /g, "").split(":before{");
Which will not split on the presence of new-lines and as a consequence the definition is ignored.
If the CSS file contains the definitions like this:
.icofont-spanner:before { content: "\eff1"; }
The parsing of the files breaks because the code will not split correctly. After much debugging had to do the following to solve it:
I.e. remove all the new lines while loading the file, so that it can be parsed by the current code. The parsing code should take care of it.