Bug : carriage router is breaking the tokenizer
See original GitHub issueOur solution minifies CSS from various websites and some CSS have carriage return (\r
) without the new line character (\n
). This character breaks the tokenizer. The only patch I found is removing all (\r) with a replace statement before applying clean-css.
Environment
- clean-css version -
npm ls clean-css
: clean-css@4.1.9 - node.js version -
node -v
: v8.9.4 - operating system: Mac OS
Configuration options
var CleanCSS = require('clean-css');
new CleanCSS({
level: { 1: {all:false}}
})
Input CSS
\r@media only screen and (max-width: 1250px) {#aspot-standard {width: 100%;}}
Please note the ‘\r’ before the ‘@’.
Actual output CSS
@media only screen and (max-width: 1250px){}
Expected output CSS
@media only screen and (max-width: 1250px){#aspot-standard{width:100%}}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Bug : carriage router is breaking the tokenizer · Issue #1000 · clean ...
Our solution minifies CSS from various websites and some CSS have carriage return (\r) without the new line character (\n). This character breaks...
Read more >Issues for all projects | Drupal.org
Issues for all projects ; Decoupled Router · Fatal error when updating or deleting nodes with an alias, Needs review, Critical, Bug report...
Read more >Split - Apache Camel
Use a Splitter to break out the composite message into a series of individual messages, each containing data related to one item. The...
Read more >c++ - BadPtr with vector<std::string> iterator in template function ...
I have a function that parses a .csv file and tokenizes each line using a "," as the delimiter. I tokenize it into...
Read more >uncaught (in promise) error cannot find module, uncaught (in ...
A module to find REPP tokenizer binary and its repp.set config file. generate_repp_command ( inputfilename ) [source] ¶ This module generates the REPP...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To be released with 4.2.0 tomorrow.
So we should handle it.