JPeer264 / node-rename-css-selectors

📝 Rename css classes and id's in files
MIT License
66 stars 9 forks source link

Pug processing fails when processing passed variables #30

Closed grkblood13 closed 6 years ago

grkblood13 commented 6 years ago

Rendering will fail for me when attempting to process a pug file that has inline javascript handling a passed variable using string interpolation. The following example should save the passed variable 'bar' to 'foo' but crashes instead.

doctype strict
html
 head
  script.
   var foo = "#{bar}"
 body
JPeer264 commented 6 years ago

Thanks, I can reproduce this issue. I am not really familiar with pug anymore. Is this a problem if the output is following? (!{bar} instead of #{bar})

doctype strict
html
 head
  script.
   var foo = "!{bar}"
 body
grkblood13 commented 6 years ago

That shouldn't be a problem.

grkblood13 commented 6 years ago

Do you have an idea of when this might get fixed? I was going to hold off on opening a site if it was going to be a quick fix but if you think it might take a while I'll just go ahead and move forward and come back to this at a later time.

JPeer264 commented 6 years ago

@grkblood13 sorry I was travelling and had little time for fixing the bug. I'll update the lib in the next hour.

JPeer264 commented 6 years ago

@grkblood13 your bug should be fixed in v3.1.1. Thanks for your patience. And please report any bugs you have, this helps me a lot to make this lib better 👍