postcss / postcss-safe-parser

Fault tolerant CSS parser for PostCSS
MIT License
120 stars 12 forks source link

-bracket-: hack[; is failing #8

Closed ldrick closed 6 years ago

ldrick commented 6 years ago

Hi, I've got some legacy vendor css, which currently uses hack number 14 Test 4 from here: http://mynthon.net/howto/-/webdev/CSS-big-list-of-css-hacks.txt

and which is curently not "safe parsed" to be further processed.

-bracket-: hack[;
    height: 25px;
];

currently becomes

-bracket-: hack[;;
    height: 25px;
]

which failes in css-loader.

ai commented 6 years ago

which failes in css-loader.

Sorry, most of postcss-safe-parser output will fail css-loader.

The core idea is to parse it without error. Not to save byte-to-byte of fix the errors.

For me, this case is too rare and too crazy to do it, sorry :).

But if you will send a pull request which will fix ; duplication, I will accept it.

ldrick commented 6 years ago

I'll fix this vendor package in a local repository and integrate my fixed version. Thanks for clearifying.