[logaling-commit] logaling/logaling-command [master] Change style

Back to archive index

null+****@clear***** null+****@clear*****
Thu Jul 26 11:58:40 JST 2012


SUZUKI Miho	2012-07-26 11:58:40 +0900 (Thu, 26 Jul 2012)

  New Revision: d44e796e9e3136b01d94629043de1241fefd4375
  https://github.com/logaling/logaling-command/commit/d44e796e9e3136b01d94629043de1241fefd4375

  Merged 2ef1dde: Merge pull request #73 from logaling/add-itil-glossary

  Log:
    Change style

  Modified files:
    lib/logaling/external_glossaries/itil_japanese.rb

  Modified: lib/logaling/external_glossaries/itil_japanese.rb (+7 -4)
===================================================================
--- lib/logaling/external_glossaries/itil_japanese.rb    2012-07-26 01:42:00 +0900 (7c23fab)
+++ lib/logaling/external_glossaries/itil_japanese.rb    2012-07-26 11:58:40 +0900 (eab2abc)
@@ -32,13 +32,16 @@ module Logaling
       abbreviation = false
       doc.css('table tr')[1..-1].each do |tr|
         p = tr.children[0].css('p').first
-        abbreviation = true and next if p['class'] == 'WLBody'
+        if p['class'] == 'WLBody'
+          abbreviation = true
+          next
+        end
 
         source_term = format_text(tr.children[0].text)
-        unless abbreviation
-          target_term = format_text(tr.children[2].text)
-        else
+        if abbreviation
           target_term = sprintf("%s %s", format_text(tr.children[4].text), format_text(tr.children[6].text))
+        else
+          target_term = format_text(tr.children[2].text)
         end
         csv << [source_term, target_term]
       end
-------------- next part --------------
An HTML attachment was scrubbed...
Descargar 



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