ejx 1.2 → 1.3

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: 2cb0b12e342368966d44f7738cff85dd83ce6af48f691885cd231d77090127df
4
- data.tar.gz: 271e81bf0e111b4f0846dff9dfea6cf03422e223b712b1f14459f2f0539081e9
3
+ metadata.gz: e44ded1120e5c09730c749323a7f2a405f639903e8257c2725c4a2275d35cfa0
4
+ data.tar.gz: dcfffdfcf51ecb1d1c60bb69f1a445c0fa7fcba5bfece8dc5b2943e503e99f03
5
5
  SHA512:
6
- metadata.gz: 8361e0271745451e9daa3c9638e019ba75c46eebd9be260be58286233d1340eb32fab7e6a73f79591d067a13d85545fe86ec6298246f315174ffab6e8b811fdb
7
- data.tar.gz: b2fe93fd63d2d2096f5c2c9b4d482f03fef1bd89b525c5b68d3f127b6762f9beb4735d0d26ad10b51e489a27a5133a3f022c8bd802ca09c763518d4deb343dd5
6
+ metadata.gz: 8ce63ec2f9e07b81e78fd3535dd3a526443d7e5b86a0e89154f2c6d5428bc654fa5efa441b2b112c196efbde1507482a3c9cb3450cf9e1fac05718dcef240bc2
7
+ data.tar.gz: 38b35ef1cef9265be667f4df3539fa71f598f407e0dab34b72aaebef77ccab960f87942c83e7a0eb345e80c0f973a0079fe0ba9c44c95465caab3dae10ef8ae6
@@ -8,7 +8,15 @@ class EJX::Template::HTMLTag::AttributeValue
8
8
  if @values.empty?
9
9
  JSON.generate('')
10
10
  else
11
- @values.map{ |v| v.is_a?(::String) ? JSON.generate(v) : v.value }.join(' + ')
11
+ @values.map do |value|
12
+ if value.is_a?(::String)
13
+ JSON.generate(value)
14
+ elsif value.value =~ /\A\s*\w+\s*\z/
15
+ value.value
16
+ else
17
+ "(" + value.value + ")"
18
+ end
19
+ end.join(' + ')
12
20
  end
13
21
  end
14
22
 
@@ -46,6 +46,7 @@ class EJX::Template::Subtemplate < EJX::Template::Node
46
46
 
47
47
  super
48
48
  end
49
+ alias_method :<<, :push
49
50
 
50
51
  def balanced?
51
52
  @balance_stack.empty?
data/lib/ejx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module EJX
2
- VERSION = '1.2'
2
+ VERSION = '1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ejx
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-10 00:00:00.000000000 Z
11
+ date: 2023-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stream_parser