bluedoc-sml 0.6.3 → 0.7.0

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: 718c548205f36ea679cb8f4bebcc30dcffd866aa3a675d04cd3f6e96d88d820f
4
- data.tar.gz: 386e5dd242af935307fc9ab42896dfc567598b1dc31a986049d41f67a0d1391b
3
+ metadata.gz: 05e45c458938f737ece18f305f8546af185a4d2dadc0c7700e0cb159da723849
4
+ data.tar.gz: 17bda07a8d0c52147d82e281c936a7d1af5715d7ac68086b9b3d34c383a1616e
5
5
  SHA512:
6
- metadata.gz: 3ec05e73f7f09af8fdfb15de922962c4bebbd0ea83a04ab43de76f866b51564ae0d0aa7706bf25d2ee5b3a6d67c4d4888eec3cac4049aacf203732ae17f73c55
7
- data.tar.gz: ae0e430fd556bd20601cfc316f016f544b29b651fe63b9dfaf323405437b2606c164e6d26877373c15d7f9c50b4d283a49c2171425969a5c1b619db3c4c487c7
6
+ metadata.gz: 3ba15e5ae42128363112ac21498494dcc4a567de70a57b76b7ee6ced9e8ed639d999fc50253ad6b3ac4d94ff4bd31766b57d3811dc7e40975c11191f86bc9a7a
7
+ data.tar.gz: 8a3a820c717f59d899bef8c871ec1386491faa10488e0801a1685299ddab0d7cc7ea8b028f75c827e29ecd02ada4c18d4c9cc5970d7bc0485c94072ad93642ca
@@ -22,7 +22,9 @@ module BlueDoc::SML::Rules
22
22
  def self.to_html(node, opts = {})
23
23
  children = opts[:renderer].children_to_html(node)
24
24
  tag = tag_name(node)
25
- %(<#{tag}>#{children}</#{tag}>)
25
+ attrs = attributes(node)
26
+ style_attrs = style_for_attrs(attrs)
27
+ %(<#{tag}#{style_attrs}>#{children}</#{tag}>)
26
28
  end
27
29
 
28
30
  def self.to_text(node, opts = {})
@@ -48,6 +50,11 @@ module BlueDoc::SML::Rules
48
50
  end
49
51
  end
50
52
 
53
+ # color
54
+ if attrs[:cl]
55
+ style["color"] = attrs[:cl];
56
+ end
57
+
51
58
  props = css_attrs(style)
52
59
  return "" if props.strip.blank?
53
60
  %( style="#{props}")
@@ -41,7 +41,10 @@ module BlueDoc::SML::Rules
41
41
  end
42
42
  end
43
43
 
44
- children
44
+ style_attrs = style_for_attrs(attrs)
45
+ return children if style_attrs.blank?
46
+
47
+ "<span#{style_attrs}>#{children}</span>"
45
48
  end
46
49
  end
47
50
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module BlueDoc
4
4
  module SML
5
- VERSION = "0.6.3"
5
+ VERSION = "0.7.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluedoc-sml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-01 00:00:00.000000000 Z
11
+ date: 2019-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport