[Groonga-commit] ranguba/chupa-text-decomposer-html at 15439b0 [master] Use :source_data

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Feb 19 00:09:44 JST 2017


Kouhei Sutou	2017-02-19 00:09:44 +0900 (Sun, 19 Feb 2017)

  New Revision: 15439b033ada7ec2348c95088110bdac3233bfaa
  https://github.com/ranguba/chupa-text-decomposer-html/commit/15439b033ada7ec2348c95088110bdac3233bfaa

  Message:
    Use :source_data

  Modified files:
    lib/chupa-text/decomposers/html.rb

  Modified: lib/chupa-text/decomposers/html.rb (+1 -6)
===================================================================
--- lib/chupa-text/decomposers/html.rb    2017-02-18 01:13:22 +0900 (dd0f63f)
+++ lib/chupa-text/decomposers/html.rb    2017-02-19 00:09:44 +0900 (b8c6fef)
@@ -41,12 +41,7 @@ module ChupaText
         else
           body = ""
         end
-        decomposed_data = TextData.new(body)
-        decomposed_data.uri = data.uri
-        data.attributes.each do |name, value|
-          decomposed_data[name] = value
-        end
-
+        decomposed_data = TextData.new(body, :source_data => data)
         attributes = decomposed_data.attributes
         title_element = (doc % "head/title")
         attributes.title = title_element.text if title_element
-------------- next part --------------
HTML����������������������������...
下載 



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