Skip to content

Commit 42408bf

Browse files
committed
fix(regex): ! should not be valid if not followed by != in theses case
1 parent f936ec6 commit 42408bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/utils/src/regex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const DICE_COMPILED_PATTERNS = {
3232

3333
export const REMOVER_PATTERN = {
3434
ASTERISK_ESCAPE: /\*/g,
35-
CRITICAL_BLOCK: /\{\*?c[fs]:[<>=!]+.+?\}/gim,
35+
CRITICAL_BLOCK: /\{\*?c[fs]:([<>=]|!=)+.+?\}/gim,
3636
EXP_REMOVER: /\{exp(.*?)\}/g,
3737
SIGN_REMOVER: /([><=]|!=)+.*$/,
3838
STAT_COMMENTS_REMOVER: /%%.*%%/,

0 commit comments

Comments
 (0)