avv2word 1.1.24 → 1.1.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avv2word/document.rb +2 -4
- data/lib/avv2word/templates/default.docx +0 -0
- data/lib/avv2word/version.rb +1 -1
- data/lib/avv2word/xslt/base.xslt +10 -0
- data/lib/avv2word/xslt/cleanup.xslt +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 584b66ad878fab4c6338ddd18e606f8baffdbb53f31886d32f8d206f4d01a54f
|
4
|
+
data.tar.gz: 3cd1e0b36e30b1a74fd6097496c5e0dfedab517f97ba243cf96f938166a5eef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c87cb3a5de9392f64dfb8b2f6abfc6cac647e1b34ce0b8e2716306db54462b36c91907f6feea1b1c1f78b9f59e46a034a9f19dc26846ffa0f9993fb686dbdc4b
|
7
|
+
data.tar.gz: cd7e5a942c485f3210d50c6de52a415618334d2a814986cfe1e63b00fb181eaac5c0aa76f2d8f6378c439595e142ea6d98e936a6f3d7cf76af3910812d84e7b2
|
data/lib/avv2word/document.rb
CHANGED
@@ -49,7 +49,7 @@ module Avv2word
|
|
49
49
|
|
50
50
|
def create(content, template_name = nil, extras = false)
|
51
51
|
content = extract_images_html(content)
|
52
|
-
content = escape_footnotes(content)
|
52
|
+
## content = escape_footnotes(content)
|
53
53
|
template_name += extension if template_name && !template_name.end_with?(extension)
|
54
54
|
document = new(template_file(template_name))
|
55
55
|
document.replace_files(content, extras)
|
@@ -150,8 +150,6 @@ module Avv2word
|
|
150
150
|
|
151
151
|
%w( word/_rels/header.xml.rels
|
152
152
|
word/_rels/footer.xml.rels
|
153
|
-
word/footnotes.xml
|
154
|
-
word/endnotes.xml
|
155
153
|
).each do |f|
|
156
154
|
if @replaceable_files[f]
|
157
155
|
out.put_next_entry f
|
@@ -179,7 +177,7 @@ module Avv2word
|
|
179
177
|
transform_and_replace(original_source, xslt_path('relations'), Document.relations_xml_file)
|
180
178
|
source = xslt(stylesheet_name: 'cleanup').transform(original_source)
|
181
179
|
|
182
|
-
add_footnotes(source.css("footnote").map{ |footnote| footnote.text })
|
180
|
+
# add_footnotes(source.css("footnote").map{ |footnote| footnote.text })
|
183
181
|
|
184
182
|
transform_and_replace(source, xslt_path('numbering'), Document.numbering_xml_file)
|
185
183
|
transform_doc_xml(source, extras)
|
Binary file
|
data/lib/avv2word/version.rb
CHANGED
data/lib/avv2word/xslt/base.xslt
CHANGED
@@ -391,6 +391,16 @@
|
|
391
391
|
<w:vertAlign w:val="superscript"/>
|
392
392
|
</w:rPr>
|
393
393
|
</xsl:if>
|
394
|
+
|
395
|
+
<xsl:if test="ancestor::*[@data-avv-color]">
|
396
|
+
<xsl:variable name="color">
|
397
|
+
<xsl:value-of select="../@data-avv-color | ../../@data-avv-color | ../../../@data-avv-color | ../../../../@data-avv-color"/>
|
398
|
+
</xsl:variable>
|
399
|
+
<w:rPr>
|
400
|
+
<w:color w:val="{$color}"/>
|
401
|
+
</w:rPr>
|
402
|
+
</xsl:if>
|
403
|
+
|
394
404
|
<w:t xml:space="preserve"><xsl:value-of select="."/></w:t>
|
395
405
|
</w:r>
|
396
406
|
</xsl:if>
|
@@ -60,6 +60,10 @@
|
|
60
60
|
<xsl:template match="strike"><s><xsl:apply-templates/></s></xsl:template>
|
61
61
|
<xsl:template match="strong"><b><xsl:apply-templates/></b></xsl:template>
|
62
62
|
|
63
|
+
<xsl:template match="u[@data-avv-color]"><xsl:variable name="color"><xsl:value-of select="./@data-avv-color"/></xsl:variable><u data-avv-color="{$color}"><xsl:apply-templates/></u></xsl:template>
|
64
|
+
<xsl:template match="em[@data-avv-color]"><xsl:variable name="color"><xsl:value-of select="./@data-avv-color"/></xsl:variable><i data-avv-color="{$color}"><xsl:apply-templates/></i></xsl:template>
|
65
|
+
<xsl:template match="strong[@data-avv-color]"><xsl:variable name="color"><xsl:value-of select="./@data-avv-color"/></xsl:variable><b data-avv-color="{$color}"><xsl:apply-templates/></b></xsl:template>
|
66
|
+
|
63
67
|
<!-- Block elements transformations -->
|
64
68
|
<xsl:template match="section"><div class="{@class}" style="{@style}"><xsl:apply-templates/></div></xsl:template>
|
65
69
|
<xsl:template match="article"><div class="{@class}" style="{@style}"><xsl:apply-templates/></div></xsl:template>
|
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.
|
4
|
+
version: 1.1.25
|
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-08-
|
11
|
+
date: 2019-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|