openxml_docx_templater 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 9e44105a83cceb34f68989e87a812785660a1cb8
4
- data.tar.gz: 738f88c71f5788ec30ce40e0cad79f1ca50492fa
3
+ metadata.gz: 1c09c24cbe7b55dc45dd32dff4b5364908ac04d1
4
+ data.tar.gz: 74aaa262f40b837e50786f30984c75562c19fdf3
5
5
  SHA512:
6
- metadata.gz: 4d1b6eee10f00beea595e90ea4785435abb4ab304cdb3c6be0cf11ebbf4716242bcad8dbbe06a2d4c838e5b0dfceb55ba43d6f6a852b776a94b426c2909c889d
7
- data.tar.gz: bbab5dd250bec7ee756aeee9c63fbe9255892e88cfc32dad3bdfbbe484c79637b5a30095be9bff4efbdab2daca368707cdbd89e98abec1fac6e08ccedc50dbca
6
+ metadata.gz: a141f4016ecb1049f560c19bec09cd41492adb0b7f377bea207db0347ad63eff0851c16f89e1ff79982863dc62d5a86e9734a9a5aba6207ead713164e68afabb
7
+ data.tar.gz: 50455c60ecab41687c829fa05023612bf5aa02fd8d46fed9e164aa9b01814cacda0919f2abbe866c9587f4d14fec123c898ad3b48d62e88c9a0c17a63d6a7faf
@@ -14,7 +14,7 @@ module OpenxmlDocxTemplater
14
14
  tmpfiles = []
15
15
  Zip::File.open(@template) do |zipfile|
16
16
  %w(word/document.xml word/styles.xml).each do |xml_file|
17
- content = zipfile.read(xml_file).refact
17
+ content = zipfile.read(xml_file).refact.force_encoding("utf-8")
18
18
 
19
19
  docxeruby = DocxEruby.new(XmlReader.new(content))
20
20
  out = docxeruby.evaluate(context)
@@ -1,3 +1,3 @@
1
1
  module OpenxmlDocxTemplater
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -12,7 +12,7 @@ module OpenxmlDocxTemplater
12
12
  m = Regexp.last_match
13
13
  if m.begin(0) > last_match_pos
14
14
  text = @src[last_match_pos...m.begin(0)]
15
- yield text, node_type(text) if text.gsub(/\s+/, '') != ''
15
+ yield text, node_type(text)
16
16
  end
17
17
 
18
18
  last_match_pos = m.end(0)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openxml_docx_templater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Ageev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-28 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler