docxify 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
  SHA256:
3
- metadata.gz: 897b2f634b40161a9795499ceb4324d568792267e7e20ac0017c606cf9f42a47
4
- data.tar.gz: 99f727d9d8b1d5063d9c290606911f45bdce092d83ede247fab952a112c72fae
3
+ metadata.gz: bc2de5623d8d0605d4aa0ad437c657749e0b39c91c13dc3af0bea385e75dabc3
4
+ data.tar.gz: 026160dfca1a977e7a8b7563e4268c363918f2130fe2e89dc0346037013d13ef
5
5
  SHA512:
6
- metadata.gz: '051835c221e1d60bf40e9ee2020ad0bb4682d67fcc3beea6f92ba80380ef0177ef7365b24562d1f19294c72fddfb83ddf860409fe835888b3682277aaf79a318'
7
- data.tar.gz: 2f21816e06987a0650c4ab1f5c0628e8eccc77be64fe1bbee35f8a40ed1aede60a95d4bf8fba7bb7ce509feb394c6a1004266541f154a43bc2372a56578b9b17
6
+ metadata.gz: 41d3b81b2ef6e3f90a1cc9a0149b19f93b96f86bb581d0c83a7f739d55cac24bae6337871a70c7278039f46ca50ecd164525d3b2f9631a7e329d1bd2e3a54989
7
+ data.tar.gz: eca5c4a3eeb6855546fb7584605fc6579c8cfbe6a31014b1d0dd9896da9c6e15482c34b2638a98c6bca6d6ca887f0f12c076d71018af6f52bcc1421ba03e5ff1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.1
4
+
5
+ Features:
6
+
7
+ - Allow combining bold, italic and underline on a single element (thanks to @b0nn1e for the PR)
8
+
3
9
  ## 0.1.0
4
10
 
5
11
  Features:
@@ -21,10 +21,10 @@ module DocXify
21
21
 
22
22
  def to_s(_container = nil)
23
23
  nodes = if @inline_styling
24
- parse_simple_html(@text)
25
- else
26
- [@text.gsub("<", "&lt;").gsub(">", "&gt;")]
27
- end
24
+ parse_simple_html(@text)
25
+ else
26
+ [@text.gsub("<", "&lt;").gsub(">", "&gt;")]
27
+ end
28
28
 
29
29
  xml = "<w:p>"
30
30
 
@@ -58,9 +58,9 @@ module DocXify
58
58
  <w:sz w:val="#{DocXify.pt2halfpt(@size)}"/>
59
59
  <w:szCs w:val="#{DocXify.pt2halfpt(@size)}"/>
60
60
  #{"<w:highlight w:val=\"yellow\"/>" if @highlight}
61
- #{"<w:b/><w:bCs/>" if node.is_a?(Hash) && node[:tag] == "b"}
62
- #{"<w:i/><w:iCs/>" if node.is_a?(Hash) && node[:tag] == "i"}
63
- #{"<w:u w:val=\"single\"/>" if node.is_a?(Hash) && (node[:tag] == "u" || node[:tag] == "a")}
61
+ #{"<w:b/><w:bCs/>" if node.is_a?(Hash) && node[:tag].match?("b")}
62
+ #{"<w:i/><w:iCs/>" if node.is_a?(Hash) && node[:tag].match?("i")}
63
+ #{"<w:u w:val=\"single\"/>" if node.is_a?(Hash) && (node[:tag].match?("u") || node[:tag] == "a")}
64
64
  #{"<w:rStyle w:val=\"Hyperlink\"/>" if node.is_a?(Hash) && node[:tag] == "a"}
65
65
  </w:rPr>
66
66
  XML
@@ -1,3 +1,3 @@
1
1
  module DocXify
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docxify
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
  - Andy Jeffries