ydocx 1.0.9 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.1.0 / 04.05.2012
2
+
3
+ * Fixed bug for HTML ref of subscript
4
+
1
5
  === 1.0.9 / 04.05.2012
2
6
 
3
7
  * Added image reference option
data/lib/ydocx/command.rb CHANGED
@@ -67,9 +67,15 @@ Usage: #{self.command} file [options]
67
67
  end
68
68
  elsif option =~ @@help
69
69
  self.help
70
+ elsif option.downcase =~ /\.(jpeg|jpg|png|gif)$/u and action == :to_html
71
+ # allow as default
72
+ # TODO
73
+ # refactor as normal option
74
+ # currently, support fachinfo/patinfo format only
75
+ require 'ydocx/templates/fachinfo'
76
+ options.merge!({:style => :frame})
70
77
  else
71
- # added image reference support for fachinfo format
72
- #self.error "#{self.command}: exit with #{option}: Unknown option"
78
+ self.error "#{self.command}: exit with #{option}: Unknown option"
73
79
  end
74
80
  else
75
81
  # default fachinfo
data/lib/ydocx/parser.rb CHANGED
@@ -63,11 +63,7 @@ module YDocx
63
63
  unless rpr.xpath('w:vertAlign').empty?
64
64
  script = rpr.xpath('w:vertAlign').first['val'].to_sym
65
65
  if script == :subscript
66
- if text =~ /^[0-9]$/
67
- text = "&sub" + text + ";"
68
- else
69
- text = markup(:sub, text)
70
- end
66
+ text = markup(:sub, text)
71
67
  elsif script == :superscript
72
68
  if text =~ /^[0-9]$/
73
69
  text = "&sup" + text + ";"
@@ -156,7 +156,7 @@ div#container {
156
156
  def init
157
157
  @references = []
158
158
  ARGV.reverse.each do |arg|
159
- if arg =~ /\.(jpg|png|gif)$/
159
+ if arg.downcase =~ /\.(jpeg|jpg|png|gif)$/
160
160
  path = Pathname.new(arg).realpath
161
161
  @references << path if path.exist?
162
162
  end
data/lib/ydocx.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  require 'ydocx/document'
5
5
 
6
6
  module YDocx
7
- VERSION = '1.0.9'
7
+ VERSION = '1.1.0'
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ydocx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-04 00:00:00.000000000 Z
12
+ date: 2012-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
16
- requirement: &24082040 !ruby/object:Gem::Requirement
16
+ requirement: &11444240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.10'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *24082040
24
+ version_requirements: *11444240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hoe
27
- requirement: &24081620 !ruby/object:Gem::Requirement
27
+ requirement: &11443820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.13'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *24081620
35
+ version_requirements: *11443820
36
36
  description: ''
37
37
  email:
38
38
  - yasaka@ywesee.com, zdavatz@ywesee.com