pnote_client 2.1.3 → 2.2.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: 4d07d9e92cacae2d6308bb1ab63ebf74f8ab4774b5215ccf52c86f175542a431
4
- data.tar.gz: 2155732edc0d93ded5e399b9f7f65debc9919808a22ee14fd50692149b8705d4
3
+ metadata.gz: 3e3e4f53fab32d8348ecdd3068d3746613eb16967928bdc2f13ed733b0971c2a
4
+ data.tar.gz: 3f72ea2d70415e20a6a0a18967ecb4836eac0d0612d5c8eb8c6d1031ac2228d4
5
5
  SHA512:
6
- metadata.gz: c2f9da13760ce1add1a7d1746c7051bf6163e09d994519009f0ede04b71a0c535292b12a1830c9b7c6c12218e240dc0e2a998ffc5af44142a87bcff7527455f8
7
- data.tar.gz: 177b9b0a5c937ed2115ce58c3a23dcf6794b1d87ff5d54b3070d68bcfb9ca32ce58aa933b309fb3ce4e79dba9ca023b5409e8fdc59fe5c8735122170a582e6f4
6
+ metadata.gz: 44bbc24cc652cca53a0ee0dd4194be34632d37f8573cb93d28ba949e2b881df94d80ee50417d611f4d2c936f00d6fa889036c5f840a741dfc27ac9f68f749ab4
7
+ data.tar.gz: f8943ca4447731faae2b9b442d18cc16104e0504a3df04534402c3d5a747a0be0b8ef55a7db3d702301a032c5cd72822a5cec6685031e2e3dbfd270e5d85c3d7
@@ -5,15 +5,31 @@ module PnoteClient
5
5
  # Textable Element
6
6
 
7
7
  def self.from_tag(char_tag)
8
- return self.new(char_tag.content)
8
+ char = self.new
9
+
10
+ char_tag.children.each do |child|
11
+ if child.name == 'LINEBREAK'
12
+ char.add_text("\n")
13
+ elsif child.name == 'TAB'
14
+ char.add_text("\t")
15
+ else
16
+ char.add_text(child.content)
17
+ end
18
+ end
19
+
20
+ return char
9
21
  end
10
22
 
11
23
  attr_reader :text
12
24
 
13
- def initialize(text)
25
+ def initialize(text = '')
14
26
  @text = text
15
27
  end
16
28
 
29
+ def add_text(text)
30
+ @text += text
31
+ end
32
+
17
33
  def content
18
34
  # 일반 텍스트는 변환작업을 하지 않지만
19
35
  # 닮음기호는 예외 상황으로 처리
File without changes
@@ -1,3 +1,3 @@
1
1
  module PnoteClient
2
- VERSION = "2.1.3"
2
+ VERSION = "2.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pnote_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - bluesh55
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-09 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,6 +112,7 @@ files:
112
112
  - lib/pnote_client/documents/hml/paragraph_reader.rb
113
113
  - lib/pnote_client/documents/hml/rectangle.rb
114
114
  - lib/pnote_client/documents/hml/style.rb
115
+ - lib/pnote_client/documents/hml/tab.rb
115
116
  - lib/pnote_client/documents/hml/table.rb
116
117
  - lib/pnote_client/documents/hml/table_cell.rb
117
118
  - lib/pnote_client/documents/hml/table_row.rb