Giter VIP home page Giter VIP logo

Comments (2)

mlsteele avatar mlsteele commented on September 17, 2024

I tried to work around this issue for the time being by vendoring this regex project into my repo using this method. But then ran into a snag where it conflicted with the 0.18 Regex package. If there was a way to simply import as Regex2 that would work. Next step is renaming all the occurrences of Regex with Regex2 in my local copy. So this is another case for elm/compiler#1625.

from regex.

evancz avatar evancz commented on September 17, 2024

Hey, sorry you are running into trouble along these lines. Cases like yours are part of what motivated the new API! But this package is slated to come out with 0.19 due to a confluence of other factors. One thing you could do in the meantime is override what new RegExp means in the context where you run Elm. Perhaps like this:

(function() {
function RegExp(str, settings) {
    try {
        return new window.RegExp(str, settings);
    } catch(e) {
        return /.^/;
    }
}
// elm program
}())

Obviously this is not ideal at all, but coordinating an Elm release is quite tricky, and I think something like the code shown here may be the best thing viable until the release is possible.

from regex.

Related Issues (11)

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.