Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid regular expression #353

Open
bruiserpink opened this issue Aug 25, 2022 · 1 comment
Open

Invalid regular expression #353

bruiserpink opened this issue Aug 25, 2022 · 1 comment

Comments

@bruiserpink
Copy link

I want to append a template in my code, but when I use {{dashcase name} in '[]',throw a error: " Invalid regular expression: /xxx/: Range out of order in character class".
Here is the action:

{
    type: "append",
    path: addRouterPath,
    pattern: /(\/\/ -- APPEND PAGE ROUTER HERE --)/gi,
    template: 
    "const {{camelCase name}}Router = [{
        path: '/{{dashCase name}}',
        name: '{{pascalCase name}}',
     }]",
},

My plopjs version is 3.1.1

@KNighD
Copy link

KNighD commented Sep 15, 2022

same problem which may caused by []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants