cbeta 2.7.2 → 2.7.3

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: 42dbfbde16fb266a235ecf8b39f0dac386bc6292ddcf30ae1ea8c00d0de0ecd2
4
- data.tar.gz: 9ee9b0c20d150076b43e58e31590698ec0b132e40bccc87544c6cdae982cf5e2
3
+ metadata.gz: 8ae524a1427675787f17496348d04797cc9b54de3389fcda113d6a4960c55a70
4
+ data.tar.gz: 8a2380a4c4959b3dcd6686f92c2c048d3a1854b675f303c446a0480f653dcb71
5
5
  SHA512:
6
- metadata.gz: 630eb89aa2076cb0cb8a0eebd27885d29ae93c33d006fc7e44a9844c3a1677fe4be3d4aa9e1688eae9d99785d4feaad2bda41390d32d0a908dbb2fa1a63e37c5
7
- data.tar.gz: 12c28ab7267f5f3bf00382c85e6beae76ffcea2ef1297fa1ca7b7fe84dbc87a69de81476d38081609c7a13937c15a696c13b9f97dd25be97eb7c2f32696a4e6d
6
+ metadata.gz: b3ec07920351d127ebb93667951881ef0433779a8b370e4a201fe7422d9f638f1ec07485b8ce7e8c670288d27b8a2e87522b7f0bd9d7ad0433a4cbb70a2888d2
7
+ data.tar.gz: 0cb923202e6ba07dac60049f077554353849a9bca04f5abdc034a6d6bc0cc6ddda373e72be76b0661301140a2347570dbeeb283f0491f86413a922795070370f
@@ -53,6 +53,7 @@ class CBETA::Gaiji
53
53
  @gaijis.key? cb
54
54
  end
55
55
 
56
+ # 依優先序呈現缺字
56
57
  def to_s(gid, cb_priority=nil, skt_priority=nil)
57
58
  if cb_priority.nil?
58
59
  cb_priority = %w(uni_char norm_uni_char norm_big5_char composition)
@@ -144,6 +144,14 @@ class CBETA::P5aToSimpleHTML
144
144
  [0xf0000 + gid[2..-1].to_i].pack 'U'
145
145
  end
146
146
 
147
+ def handle_item(e)
148
+ r = traverse(e)
149
+ if e.key? 'n'
150
+ r = e['n'] + r
151
+ end
152
+ r
153
+ end
154
+
147
155
  def handle_lb(e)
148
156
  return '' if e['type']=='old'
149
157
  @lb = e['n']
@@ -187,6 +195,7 @@ class CBETA::P5aToSimpleHTML
187
195
  when 'foreign' then handle_foreign(e)
188
196
  when 'g' then handle_g(e)
189
197
  when 'graphic' then ''
198
+ when 'item' then handle_item(e)
190
199
  when 'lb' then handle_lb(e)
191
200
  when 'lem' then handle_lem(e)
192
201
  when 'mulu' then ''
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.2
4
+ version: 2.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Chou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-24 00:00:00.000000000 Z
11
+ date: 2018-07-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby gem for use Chinese Buddhist Text resources made by CBETA (http://www.cbeta.org).
14
14
  email: zhoubx@gmail.com