Giter Site home page Giter Site logo

Comments (6)

Lazerbeak12345 avatar Lazerbeak12345 commented on July 3, 2024

It's odd though, in line 152 and in line 288 it looks like it does have support for these strings: in fact it seems to be treating them as any other string. Perhaps the issue is in the next function when it removes comments?

from jsmin.

louking avatar louking commented on July 3, 2024

I'm seeing the same problem, just came looking for this here.

          d3.select(`.tablerow-${year} .date`).text(`${formatDate(d.date)}/${year}`);
          d3.select(`.tablerow-${year} .count`).text(d.count);

is getting translated to

d3.select(`.tablerow-${year}.date`).text(`${formatDate(d.date)}/${year}`);d3.select(`.tablerow-${year}.count`).text(d.count);

Note the spaces missing before .date and .count in the two statements

from jsmin.

douglascrockford avatar douglascrockford commented on July 3, 2024

Are you using the lastest (2019-10-30)?

JSMIN treats '' exactly the same as '"'. It will get confused if you nest '' inside of '${}' expressions, but humans do too, so I don't recommend doing that.

Have a happier 2022.

from jsmin.

Lazerbeak12345 avatar Lazerbeak12345 commented on July 3, 2024

In the code that I encountered, only part of it was under my control - the rest in a proprietary WordPress plugin. You can't always choose how the code looks, or what semantics it uses.

from jsmin.

douglascrockford avatar douglascrockford commented on July 3, 2024

It seems that you are using a version of JSMIN from the time before backtick was added to JavaScript.

from jsmin.

Lazerbeak12345 avatar Lazerbeak12345 commented on July 3, 2024

@TimeClicky You might want to take it from here... (since I don't work for timeclick anymore....)

from jsmin.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.