lhj-tools 0.2.69 → 0.2.71

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: bd2067cef96b6de5accdb2a0944a424879ec9c700c853be313389db776c54c8f
4
- data.tar.gz: 28b3a6b6a1589d2ed1f06bcdb2ec4380ff95cd175fa11b876aa0b7e75f4b3a49
3
+ metadata.gz: e9f34207902253cd7e343b132210af875a99f7b0cbc17a14f811e4044af781ce
4
+ data.tar.gz: c85d8572ea5c1e480753aa2a1f8f842882ae6ef374cb869f98789583adbea7fb
5
5
  SHA512:
6
- metadata.gz: 76a2fbc806f1a656859ebb6cc332736419d411ce06d94a8911dd24072177c919642f330be073b84651512f2c89f0e8b370280ceee0eccf836639b783f7d5a837
7
- data.tar.gz: b6d2754b914fdc39f1458c0c8a47c08548d0e8b7732ba05ec9ebb16f9987953560c7ae4682ddc089a50685af17788cebbcd3a5972c5144cb723b35656288e3b3
6
+ metadata.gz: ee0d0dce1b75b11a7d7894d24e161698e03e438c1d61f60058c3acda029cccc7f1cbf0e02352fa49cee03c7ec94b8658a407bf5a14a1b8514b00bd78718619ce
7
+ data.tar.gz: f7f2d0d2f5d4916b3b363aeedb588c00814f7b4ae89fb1264841b226365d5574a8743b7468b9f63aad57d9139cf0ea938684c16143b0b789e5086cc4adfd4d49
@@ -93,6 +93,7 @@ module Lhj
93
93
 
94
94
  next if multi_comment
95
95
  next if line =~ %r{/\*.*\*/}
96
+ next if line =~ %r{^\s*//}
96
97
  next unless zh_ch_reg =~ line
97
98
  next if line =~ /#pragma/
98
99
  next if line =~ /log|Log|LOG|NSCAssert/
@@ -96,7 +96,7 @@ module Lhj
96
96
  cn_str = row[cn_c]
97
97
  hk_str = row[cn_c]
98
98
  # cn_str = Lhj::Trans::Helper.instance.trans_zh_cn_str(cn_str) if trans_cn
99
- hk_str = Lhj::Trans::Helper.instance.trans_zh_hk_str(hk_str)
99
+ hk_str = Lhj::Trans::Helper.instance.trans_zh_hk_str(hk_str) if hk_str&.length&.positive?
100
100
  @key_map[key] = { key: key, cn: cn_str, hk: hk_str, en: row[en_c] } unless key =~ /[\u4e00-\u9fa5]/
101
101
  end
102
102
  end
@@ -144,6 +144,10 @@ module Lhj
144
144
  str += line
145
145
  next
146
146
  end
147
+ if line =~ %r{^\s*//}
148
+ str += line
149
+ next
150
+ end
147
151
  unless zh_ch_reg =~ line
148
152
  str += line
149
153
  next
@@ -161,7 +165,9 @@ module Lhj
161
165
  next
162
166
  end
163
167
 
164
- str += handle_modify_line(f, line)
168
+ modify_line = handle_modify_line(f, line)
169
+ str += "//#{line}" unless line.eql?(modify_line)
170
+ str += modify_line
165
171
  end
166
172
  end
167
173
  str
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.69'
4
+ VERSION = '0.2.71'
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.69
4
+ version: 0.2.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-29 00:00:00.000000000 Z
11
+ date: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj