DressUp
DressUp copied to clipboard
Multiple !import_file in a single JavaScript file (Perl)
I added two !import_file commands in a single JavaScript file and it failed to parse the content using the Perl script.
The JS file contained:
var css1 = "!import_file /file/path.css !important", css2 = "!import_file file/path2.css !important";
When performing the the replacement the Perl regex was matching the following string as the $filename:
"/file/path.css !important!import_file file/path2.css"
And was failing to find the file.
It would be great to be able to add two files to a single !import_file command.
This sounds like a greedy matcher run amok. Thanks for reporting!
Unfortunately, I'm having trouble reproducing. I've written a test case that passes on my system. Would you mind checking out out the following branch and seeing if make test
passes on your system?
https://github.com/jugglinmike/DressUp/compare/multi-file