avv2word 1.1.29 → 1.1.30

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: 9f06563e42e5c9701e0d75480f3357ec95cbd18e8ed72ab15904da0d0ad1f45a
4
- data.tar.gz: 2836f7ef77d3b2d33f35e96d54b65d8220693c1c8e80b47e04da21009eb143da
3
+ metadata.gz: 8f21aa08f0eb889b07a6ae13cb5ed80156eb8bd3b2730b3bd99eb204a2c5b790
4
+ data.tar.gz: 172e0cde722ad248e304ca092769bef904806efb5d43a11fdc4173385ad5963b
5
5
  SHA512:
6
- metadata.gz: a277a0b59de3de585094cb3bc8ca72f6dbf3e063ab41446d8268ef428bda117e01a159feccdee36c0b8a7d2df0a93d78d6d9897a4204fbccfe476339db5b5bad
7
- data.tar.gz: ac00fa6868fe6a84b19babc2910ffd327ec81f08929e2220fa72dea3b16230dc036bbeded909b9e2db6a6d5f1f923b12a652e874d5d9a2c3af69cad48f3dd157
6
+ metadata.gz: 6a46e14ff10f766f006a3c3513875d6b58afe385f715b471ecedb4e5a2711514dcc468364949fdb6e51210d017e36624147f8006be361d460f137e90060922cc
7
+ data.tar.gz: '03578535709c0f1761318c6cf9c723f8bc073b8566485d7bb4b61d98df1beb18916d5a40d8c33f69a87945bef5d345022e6171b763a42df391433c945e4c679f'
@@ -18,7 +18,6 @@ module Avv2word
18
18
  mime_type, img_data = img_elm.attributes["src"].value.split(",")
19
19
  # ^--data:image/jpeg;base64
20
20
  ext = mime_type.match(/image\/(\w+?);base64/)[1]
21
- ext = "jpg" if ext == "jpeg"
22
21
  img_path = "tmp_imgs/image#{i+1}.#{ext}"
23
22
  File.open(img_path,"wb"){|f| f.write Base64.decode64(img_data)}
24
23
  img_elm.attributes["src"].value = img_path
@@ -49,7 +48,7 @@ module Avv2word
49
48
 
50
49
  def create(content, template_name = nil, extras = false)
51
50
  content = extract_images_html(content)
52
- ## content = escape_footnotes(content)
51
+ content = escape_footnotes(content)
53
52
  template_name += extension if template_name && !template_name.end_with?(extension)
54
53
  document = new(template_file(template_name))
55
54
  document.replace_files(content, extras)
@@ -177,14 +176,14 @@ module Avv2word
177
176
  transform_and_replace(original_source, xslt_path('relations'), Document.relations_xml_file)
178
177
  source = xslt(stylesheet_name: 'cleanup').transform(original_source)
179
178
 
180
- # add_footnotes(source.css("footnote").map{ |footnote| footnote.text })
181
-
182
179
  transform_and_replace(source, xslt_path('numbering'), Document.numbering_xml_file)
183
180
  transform_doc_xml(source, extras)
184
181
 
185
182
  local_images(source)
186
183
  local_images(footer, :footer) if @footer
187
184
  local_images(header, :header) if @header
185
+
186
+ add_footnotes(source.css("footnote").map{ |footnote| footnote.text })
188
187
  end
189
188
 
190
189
  def transform_doc_xml(source, extras = false)
@@ -1,3 +1,3 @@
1
1
  module Avv2word
2
- VERSION = '1.1.29'
2
+ VERSION = '1.1.30'
3
3
  end
@@ -16,7 +16,7 @@
16
16
  xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
17
17
  mc:Ignorable="w14 wp14">
18
18
  <xsl:template match="footnote">
19
- <xsl:number level="any" count="footnote" format="1"/>
19
+ <!--<xsl:number level="any" count="footnote" format="1"/>-->
20
20
  <w:r>
21
21
  <w:rPr>
22
22
  <w:rStyle w:val="FootnoteReference"/>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avv2word
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.29
4
+ version: 1.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marián Bilas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-08 00:00:00.000000000 Z
11
+ date: 2019-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack