Skip to content

Commit 456ded2

Browse files
author
plamen5kov
committed
upgraded regex in template build gradle file
1 parent 12d37e0 commit 456ded2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

build/project-template-gradle/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ def createIncludeFile (filePath, fileName, dimensionName) {
189189
}
190190

191191
def sanatizeDimensionName(str) {
192-
return str.replaceAll(/[\W]/, "")
192+
return str.replaceAll(/\W/, "")
193193
}
194194

195195
//make sure the include.gradle file, produced by the user, has only allowed characters in dimension attribute and remove any invalid characters if necessary
196196
def updateIncludeGradleFile(subFile, dimensionName) {
197197
def igFile = new File(subFile.getAbsolutePath())
198-
def newContent = igFile.text.replaceAll(/dimension\s["|'](.+)["|'']/) { fullMatch, fDimension ->
198+
def newContent = igFile.text.replaceAll(/dimension\s+["'](.+?)["']/) { fullMatch, fDimension ->
199199
def newFg = sanatizeDimensionName(fDimension)
200200
dimensionName = newFg
201201
return "dimension \"$newFg\""

0 commit comments

Comments
 (0)