jotform / css.js

A lightweight, battle tested, fast, CSS parser in JavaScript
https://medium.com/jotform-form-builder/writing-a-css-parser-in-javascript-3ecaa1719a43
MIT License
426 stars 63 forks source link

Fix issue with common "{{ }}" template syntax in a CSS rule #30

Open Lixivial opened 4 years ago

Lixivial commented 4 years ago

This adjusts the regex to meet the test case outlined in issue #29

Basically it expands the syntax parsing to ignore }} in both the @media and non @media query cases, while also ensuring that all further text in the capture group is maintained.

In addition, I added 6 or 7 more unit tests and cleaned up a couple of unit tests to add other potential regression checks.