Fix CodeQL issue with regular expression

This commit is contained in:
Marcus Wolschon
2023-01-15 14:27:55 +01:00
parent 394f24c29f
commit c690bc18a0
3 changed files with 12163 additions and 16677 deletions

View File

@ -246,7 +246,7 @@ class IngredientParser:
# handle "(from) - (to)" amounts by using the minimum amount and adding the range to the description # handle "(from) - (to)" amounts by using the minimum amount and adding the range to the description
# "10.5 - 200 g XYZ" => "100 g XYZ (10.5 - 200)" # "10.5 - 200 g XYZ" => "100 g XYZ (10.5 - 200)"
ingredient = re.sub("(\d+|\d+[\\.,]\d+) - (\d+|\d+[\\.,]\d+) (.*)", "\\1 \\3 (\\1 - \\2)", ingredient) ingredient = re.sub("^(\d+|\d+[\\.,]\d+) - (\d+|\d+[\\.,]\d+) (.*)", "\\1 \\3 (\\1 - \\2)", ingredient)
# if amount and unit are connected add space in between # if amount and unit are connected add space in between
if re.match('([0-9])+([A-z])+\s', ingredient): if re.match('([0-9])+([A-z])+\s', ingredient):

View File

@ -136,13 +136,14 @@ module.exports = {
config.devServer config.devServer
.host("localhost") .host("localhost")
.port(8080) .port(8080)
.set('hot', 'only') //.set('hot', 'only')
.set('static', {watch: true}) .set('static', {watch: true})
// old webpack dev server v3 settings // old webpack dev server v3 settings
// .hotOnly(true) // .hotOnly(true)
// .watchOptions({ poll: 500 }) // .watchOptions({ poll: 500 })
// .public("http://localhost:8080") // .public("http://localhost:8080")
.https(false) .https(false)
.hot(true)
.headers({"Access-Control-Allow-Origin": ["*"]}) .headers({"Access-Control-Allow-Origin": ["*"]})
}, },
} }

File diff suppressed because it is too large Load Diff