add coderabbit suggestion about PCRE2 regex and length of the string with a new line

This commit is contained in:
Fijxu 2026-09-14 17:47:19 -03:00
parent 9199271cfd
commit 73c3163d8f
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4

View File

@ -409,5 +409,5 @@ def validate_video_id(id : String) : Bool
# This is the video ID regex. May be need to be changed
# if Youtube ever decides to add more characters to their
# video IDs.
/^[a-zA-Z0-9_-]{11}$/.matches?(id)
/\A[a-zA-Z0-9_-]{11}\z/.matches?(id)
end