Coder Social home page Coder Social logo

Comments (4)

cxw42 avatar cxw42 commented on June 26, 2024

Thanks for reporting! Would you please post instructions for reproducing the issue? Please make sure to include the specific commit at which you are testing. Much appreciated!

from editorconfig-core-c.

uap-universe avatar uap-universe commented on June 26, 2024

I am testing against master branch by invoking ec_glob(pattern, string) with the pattern and the test strings from above.

from editorconfig-core-c.

xuhdev avatar xuhdev commented on June 26, 2024

I think this is a bug, as there's really no meaning * in brackets. We really tried to mimic gitignore patterns in the beginning, and my experiment shows that gitignore would see * as a literal inside brackets. Also checked out PCRE, same behavior.

I think this is also what the spec means, but we didn't write it clearly out.

from editorconfig-core-c.

uap-universe avatar uap-universe commented on June 26, 2024

Yes, I agree. There is another thing the spec does not clearly write out: slashes have precedence over anything else.

Meaning that a slash will "destroy" the bracket pattern.

Example: [ab/cd] will not be translated as "one of a, b, /, c, or d" but instead it will be the literal sequence [ab/cd].

See also issue 499 in the main repo.

and you might also be interested in how I solved this.

However, since this looks very intentional, I think it's desired behavior - just not documented. So when fixing this bug, you might need to be careful not to change this behavior.

from editorconfig-core-c.

Related Issues (20)

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.