[Groonga-commit] ranguba/chupa-text at 3b12885 [master] Strict extension detect pattern

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jul 11 17:26:32 JST 2017


Kouhei Sutou	2017-07-11 17:26:32 +0900 (Tue, 11 Jul 2017)

  New Revision: 3b128854ae7b889a04a9ba7565570e42eb003d02
  https://github.com/ranguba/chupa-text/commit/3b128854ae7b889a04a9ba7565570e42eb003d02

  Message:
    Strict extension detect pattern

  Modified files:
    lib/chupa-text/text-data.rb

  Modified: lib/chupa-text/text-data.rb (+2 -2)
===================================================================
--- lib/chupa-text/text-data.rb    2017-07-11 16:10:06 +0900 (b6dd84f)
+++ lib/chupa-text/text-data.rb    2017-07-11 17:26:32 +0900 (7fa57c2)
@@ -18,8 +18,8 @@ module ChupaText
   class TextData < Data
     def initialize(text, options={})
       super(options)
-      self.uri = uri.to_s.gsub(/\.[^.]+\z/, ".txt")
-      self.path = path.to_s.gsub(/\.[^.]+\z/, ".txt")
+      self.uri = uri.to_s.gsub(/\.[a-z\d]+\z/i, ".txt")
+      self.path = path.to_s.gsub(/\.[a-z\d]+\z/i, ".txt")
       self.mime_type = "text/plain"
       self.body = text
       self.size = text.bytesize
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index