pptxt 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pptxt/slide.rb +9 -6
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36cc4df6de200555653017141044b643c701a96e
4
- data.tar.gz: 5b2fd49717d0df30d05809d24171fe346bf3a28a
3
+ metadata.gz: 89d9f2124b0d306b53b3c40f7e606f379a476cd3
4
+ data.tar.gz: 6f0517fc1d80339cce15f98ac045454bbc69c265
5
5
  SHA512:
6
- metadata.gz: c46113136a6e533c6c9c11f823d679bc5062472b39b07abbdcd0a5e16087166a5729c89eddb7af14443f6caa5734d85b2bf16bc0bdeb34f05832c1af5190a6a0
7
- data.tar.gz: 7a256a01b026be8a7d911f3c8d43555ccf314e561c96b45c9262472002411d5d90b2178037e1d1a34912dac1e277631199253abdcecf47f670c4065667c1d1b6
6
+ metadata.gz: 322cd1b4b9059bd63089f0e8f108a0d67ecb8957641085f18599ac7317b5c4e38d5b6e6de2eb9eba4ebf20525a3556a0c6b0f42404dcb06f90189bf092f17863
7
+ data.tar.gz: f6474200666b739229cd0bdad67f9c83cf7a1f55c8dd1d601003e9a53667c66e328a8c9038bcbd8365fb1dfe0c7efa646e907a8fceb5579f588980e04f2c30eb
data/lib/pptxt/slide.rb CHANGED
@@ -75,8 +75,11 @@ class PPtxt::PPtxtSlide
75
75
  lvl = 0
76
76
  numlist_count = Array.new
77
77
 
78
- @xml.each_line do |line|
79
- line.strip!
78
+ @xml.each_line do |raw_line|
79
+ line = raw_line.strip
80
+ raw_line.gsub!(/^ *<a:t>/, "")
81
+ raw_line.gsub!(/[\n\r]$/, "")
82
+
80
83
  case line
81
84
  when "<a:p>"
82
85
  # Assume bullet list
@@ -104,19 +107,19 @@ class PPtxt::PPtxtSlide
104
107
  # Handle text
105
108
  if (in_title)
106
109
  @title += " " if (!first_time && was_newline)
107
- @title += line[5..-1]
110
+ @title += raw_line
108
111
  elsif (in_subtitle)
109
112
  if (!first_time && was_newline)
110
113
  @subtitle += " "
111
114
  end
112
- @subtitle += line[5..-1]
115
+ @subtitle += raw_line
113
116
  elsif(ignore)
114
117
  break
115
118
  else
116
119
  if (was_newline)
117
120
  list_index = numlist_count[lvl] || 1
118
121
  @content += handle_format(
119
- line[5..-1],
122
+ raw_line,
120
123
  format,
121
124
  lvl,
122
125
  list_index
@@ -125,7 +128,7 @@ class PPtxt::PPtxtSlide
125
128
  numlist_count[lvl] = list_index + 1
126
129
  end
127
130
  else
128
- @content += line[5..-1]
131
+ @content += raw_line
129
132
  end
130
133
  end
131
134
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pptxt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-07 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -65,7 +65,7 @@ files:
65
65
  - lib/pptxt/error/missing_dependency_error.rb
66
66
  - lib/pptxt/error/unknown_xml_error.rb
67
67
  - lib/pptxt/slide.rb
68
- homepage: http://mjwhitta.github.io/pptxt
68
+ homepage: https://mjwhitta.github.io/pptxt
69
69
  licenses:
70
70
  - GPL-3.0
71
71
  metadata: {}