lhj-tools 0.2.37 → 0.2.38

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0eaa7959845d72417a6ce58dffa0a4588102583824e5f578ceafe428c5e868bd
4
- data.tar.gz: a12ab0536e65236c4b716045f181a4a7026914cacf3f360c5d28e7371c6a4adf
3
+ metadata.gz: b8aaa3a0b58e7e78dd752c9e5d9d27d3c7ffc88d3dfad5a5f4c270f3e765ce9c
4
+ data.tar.gz: 8ffc2071525bb33e6a87922740bfe085409dd2b8c54e5d3de4191e89f832473b
5
5
  SHA512:
6
- metadata.gz: 5320d5b42081f5c1e72d84ebab2919d1f4555dbfb9dbbf5214f24dd209936cc774ad52a6cfb68c264af642a0a88bbcfc1accf1802b99d3baee4a72fb6ab5b929
7
- data.tar.gz: 6734984f87df374b44717406a9aaf3eab2fd0fd0f8dc676939638e929e16e11ab4c841106d77f8ca8292f6f266c30cdddac5977f4cd2338fdd57f5b893ee834c
6
+ metadata.gz: a656e493205961905b8cfa69121ccea33cd883f0c90464c2efefb152751010e1602cadb955c115aaae52384c87fbcf53b87e411705c1d08c5bc1313cfed1f551
7
+ data.tar.gz: e85ecc2201a677d68cbad63b0b29f5b37406aef9ffd75a4bb08d62c8f83260324aebd9be337c022e4fdc4bf079d27318f34ee6b6c74811ec60063df3d8405304
@@ -18,7 +18,7 @@ module Lhj
18
18
 
19
19
  result[File.basename(f)] = infos
20
20
  end
21
- result.keys.each_slice(10) { |a| notify(result.slice(*a)) }
21
+ # result.keys.each_slice(10) { |a| notify(result.slice(*a)) }
22
22
  end
23
23
 
24
24
  def self.show_result(result)
@@ -35,10 +35,14 @@ module Lhj
35
35
  def self.handle_file(file)
36
36
  result = []
37
37
  File.open(file, 'r') do |f|
38
+ multi_comment = false
38
39
  f.readlines.each_with_index do |line, idx|
39
- next if line =~ %r{//}
40
- next if line =~ /#/
41
- next if line.strip =~ /^\*/
40
+ multi_comment = true if line =~ %r{/\*} && line !~ %r{\*/} && !multi_comment
41
+ multi_comment = false if line !~ %r{/\*} && line =~ %r{\*/} && multi_comment
42
+
43
+ next if multi_comment
44
+ next if line =~ %r{//} && line.gsub(%r{//.*}, '') !~ /[\u4e00-\u9fa5]/
45
+ next if line =~ /#pragma/
42
46
  next if line =~ /log|Log|LOG/
43
47
  next unless line =~ /[\u4e00-\u9fa5]/
44
48
  next unless Lhj::Trans::Helper.instance.contain_zh_hk(line)
data/lib/lhj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lhj
4
- VERSION = '0.2.37'
4
+ VERSION = '0.2.38'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhj-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.37
4
+ version: 0.2.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-05 00:00:00.000000000 Z
11
+ date: 2023-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj