Skip to content

Commit

Permalink
fix: Remove false positives of format detection (#2310)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar committed May 17, 2024
1 parent 8f5c268 commit 289772f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CToIcuPlaceholderConvertor : ToIcuPlaceholderConvertor {
val C_DETECTION_REGEX =
"""
(?x)(
%
(^|\W+)%
(?:(?<argnum>\d+)${"\\$"})?
(?<flags>[-+0\#]+)?
(?<width>\d+)?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class JavaToIcuPlaceholderConvertor() : ToIcuPlaceholderConvertor {
val JAVA_DETECTION_REGEX =
"""
(?x)(
%
(^|\W+)%
(?:(?<argnum>\d+)${"\\$"})?
(?<flags>[-\#+0,(]+)?
(?<width>\d+)?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PhpToIcuPlaceholderConvertor : ToIcuPlaceholderConvertor {
val PHP_DETECTION_REGEX =
"""
(?x)(
%
(^|\W+)%
(?:(?<argnum>\d+)${"\\$"})?
(?<flags>[\-+0']+)?
(?<width>\d+)?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RubyToIcuPlaceholderConvertor : ToIcuPlaceholderConvertor {
val RUBY_DETECTION_REGEX =
"""
(?x)(
%
(^|\W+)%
(?:(?<argnum>\d+)?${"\\$"}|<(?<argname>\w+)>)?
(?<flags>[+\-0\#*]+)?
(?<width>\d+)?
Expand Down

0 comments on commit 289772f

Please sign in to comment.