From bde1d94f05d143f7db61955d510d1f0d33dfb79b Mon Sep 17 00:00:00 2001 From: Ryan Haskell-Glatz Date: Sun, 2 May 2021 10:21:06 -0500 Subject: [PATCH] imagine: a regex that _doesn't_ brick your computer --- src/cli/package-lock.json | 4 ++-- src/cli/package.json | 2 +- src/cli/src/templates/utils.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/package-lock.json b/src/cli/package-lock.json index 7a72340..8f61cc4 100644 --- a/src/cli/package-lock.json +++ b/src/cli/package-lock.json @@ -1,12 +1,12 @@ { "name": "elm-spa", - "version": "6.0.1", + "version": "6.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "elm-spa", - "version": "6.0.1", + "version": "6.0.2", "license": "BSD-3-Clause", "dependencies": { "chokidar": "3.4.2", diff --git a/src/cli/package.json b/src/cli/package.json index caaf51e..8a4388f 100644 --- a/src/cli/package.json +++ b/src/cli/package.json @@ -1,6 +1,6 @@ { "name": "elm-spa", - "version": "6.0.1", + "version": "6.0.2", "description": "single page apps made easy", "bin": "dist/src/index.js", "scripts": { diff --git a/src/cli/src/templates/utils.ts b/src/cli/src/templates/utils.ts index f7c0e07..852cb2f 100644 --- a/src/cli/src/templates/utils.ts +++ b/src/cli/src/templates/utils.ts @@ -317,7 +317,7 @@ const pageModelArguments = (path: string[], options : Options) : string => { } const exposes = (value : string) => (str : string) : boolean => { - const regex = new RegExp('^module\\s+[^\\s]+\\s+exposing\\s+\\((([^)]|.)+)\\)') + const regex = new RegExp('^module\\s+[^\\s]+\\s+exposing\\s+\\((([^\\\\])+)\\)') const match = (str.match(regex) || [])[1] if (match) { return match.split(',').filter(a => a).map(a => a.trim()).includes(value)