markus 4.0.18 → 4.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/markus.rb +5 -3
  3. data/markus.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e077e0b4d02db2148e80238abdcbcbe70b14452
4
- data.tar.gz: c4df6a656119e9c381ebf6f79a01f6b41b406e46
3
+ metadata.gz: 2d3b9d8f0f128ae19a1c22c62593e6fa92e47d42
4
+ data.tar.gz: 631f74819c013ba5f978bba90f0fda0a206d7b4d
5
5
  SHA512:
6
- metadata.gz: 2b3d91c4f93fa5c83e4cd8e3eff7c688df5864e9a488cd65b0565418f771007bb622f7c36bf77070e7a41eb76bded85c5c5e0aa78e0161fc13dc48eb1903a6cb
7
- data.tar.gz: 1247969538f0a730955eec25d5b62ba1e36acfba32d9b555ef4c5e9ebfe481e433c0fad1f82d0e755ab23fba9adf3411b4b3f3febd55df23e6c1fac1c256ef8f
6
+ metadata.gz: 116c74df7f63b04362af86be3c01bcb45bbf2aba9039c2e0760be4d3d90de9bc307b28adea33fa8f2c7ee35d74ba9d50690efddac419a0e9f9786b8baec6f9a9
7
+ data.tar.gz: 4e992673dd97747d3149ad8c38b0d9730bc237ca9b6b71ab1d061cd7db3dfbdf826375a045639d70debe94e03079b9432e38d057561cea1f480a7ca414395a75
data/lib/markus.rb CHANGED
@@ -29,6 +29,8 @@ class MarkUS
29
29
  attr_accessor :__markus_includes
30
30
  end
31
31
 
32
+ class MarkUSString < String; end
33
+
32
34
  attr_reader :__markus_indent, :__markus_reload
33
35
  def __markus_indent=(value) #{{{
34
36
  self.class.__markus_indent = value == true ? true : false
@@ -172,7 +174,7 @@ class MarkUS
172
174
  }.compact.join(", ").strip + " }"
173
175
  attrs = '{}' if attrs == "{ }"
174
176
  when String
175
- content = "\"#{a.gsub(/"/,'\\\"')}\""
177
+ content = a.class == ::MarkUS::MarkUSString ? a : "\"#{a.gsub(/"/,'\\\"')}\""
176
178
  when Integer, Float
177
179
  content = a
178
180
  else
@@ -192,8 +194,8 @@ class MarkUS
192
194
  @__markus_parent = nil
193
195
 
194
196
  @__markus_buffer << __markus_indent + "\"#{tname}\": {"
195
- __markus_json "attributes", attrs if attrs
196
- __markus_json "value", content if content
197
+ __markus_json "attributes", ::MarkUS::MarkUSString.new(attrs) if attrs
198
+ __markus_json "value", ::MarkUS::MarkUSString.new(content) if content
197
199
  __markus_json "content", &blk if blk
198
200
  @__markus_buffer.last.chomp!(',')
199
201
  @__markus_buffer << __markus_indent + "},"
data/markus.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "markus"
3
- s.version = "4.0.18"
3
+ s.version = "4.0.19"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "MarkUS - Markup UnderScore. Quick n' dirty templating in the spirit of markaby."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markus
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.18
4
+ version: 4.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler