From 1a140cbdf84fdfd4d6fbac3c92b8d1281d8ff727 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Thu, 22 Dec 2022 12:14:46 +0100 Subject: [PATCH] Properly extract language from json files Signed-off-by: Alexander Borsuk --- lib/twine/formatters/jquery.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/twine/formatters/jquery.rb b/lib/twine/formatters/jquery.rb index 2712782..cfbce5b 100644 --- a/lib/twine/formatters/jquery.rb +++ b/lib/twine/formatters/jquery.rb @@ -14,7 +14,7 @@ module Twine end def determine_language_given_path(path) - match = /^.+-([^-]{2})\.json$/.match File.basename(path) + match = /^.+([a-z]{2}-[A-Z]{2})\.json$/.match File.basename(path) return match[1] if match return super