Skip to content

Commit

Permalink
Merge pull request #80 from sgcarstrends/79-fix-code-scanning-alert-u…
Browse files Browse the repository at this point in the history
…seless-regular-expression-character-escape

Fix regex
  • Loading branch information
ruchernchong authored Dec 25, 2024
2 parents d158741 + 450eeab commit 61b698e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { FuelType } from "@/types";
export const CACHE_TTL = 24 * 60 * 60;

export const HYBRID_REGEX = new RegExp(
`^(${FuelType.Diesel}|${FuelType.Petrol})-${FuelType.Electric}(\s\(Plug-In\))?$`,
`^(${FuelType.Diesel}|${FuelType.Petrol})-${FuelType.Electric}(\\s\\(Plug-In\\))?$`,
"i",
);

0 comments on commit 61b698e

Please sign in to comment.