ejx 0.2 → 1.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: 9f52677d4f3ebc419528b87b62deb8c54c4c87b65193a58efd675ebf4cdec670
4
- data.tar.gz: 1d3529c96bb7756822e0b1f0708f5f39ab6fabccb20376196ee1729cddf75e8c
3
+ metadata.gz: 2dc481f36010e82885f2b6ea60a4f13bb4e6c9c4b823ee6899fd02ce12650942
4
+ data.tar.gz: 7262002c9a7cb0b3ce87def1d77911e45d6a3e85dde2ae4bfe3fa41aff0f7741
5
5
  SHA512:
6
- metadata.gz: 7ca36c97ddf80cef591f4f2c0c0787c6c8ea09f52484ca30932aae9c8a1c4195cbdab3a5a8f12579a671e47fa0fcbdaeeefd0ba849218cfbb1c698ad70ec34df
7
- data.tar.gz: dd5c1d1c21812e910e24fd156d0dca8458aacf6f04958a073c172fe4bf7cf6f8e3e11d6c0b52904dae3597cb13996267228ba5896f703198646f3c41a53330f8
6
+ metadata.gz: 58f1139b43dcf0205a43619b0f167460d27bd5a75b1708cb4b9497887b8696c7aa5489df61ac89da4e17b3df22a460d3b9fa4ca2f8ce2e5ed6b5fa6c30ca41a4
7
+ data.tar.gz: 8cd338246eb063e0156504252c83216fc003f507af94655b3f383984e98831ff5e01ddcc669d6c80e85fa84b8a47888170c97e1ccf11e28b0a80be6f23606142
data/lib/ejx/template.rb CHANGED
@@ -69,7 +69,7 @@ class EJX::Template
69
69
  subtemplate.children << pm.strip
70
70
  @tree.last.children << subtemplate
71
71
  @stack.pop
72
- elsif open_modifier && (pm.match(/function\s*\([^\)]*\)\s*\{\s*\Z/m) || pm.match(/=>\s*\{\s*\Z/m))
72
+ elsif pm.match(/function\s*\([^\)]*\)\s*\{\s*\Z/m) || pm.match(/=>\s*\{\s*\Z/m)
73
73
  @tree << EJX::Template::Subtemplate.new(pm.strip, [open_modifier, close_modifier].compact)
74
74
  @stack.pop
75
75
  else
@@ -12,7 +12,7 @@ class EJX::Template::Base
12
12
  var_generator = EJX::Template::VarGenerator.new
13
13
 
14
14
  output = if @escape
15
- "import {" + @escape.split('.').reverse.join(" as escape} from '") + "';\n"
15
+ "import {" + @escape.split('.').reverse.join(" as __ejx_append} from '") + "';\n"
16
16
  else
17
17
  "import {append as __ejx_append} from 'ejx';\n"
18
18
  end
@@ -27,7 +27,7 @@ class EJX::Template::Subtemplate
27
27
 
28
28
  output << ' '*(indentation+4) << "#{global_output_var}.push(#{output_var});\n";
29
29
  output << ' '*(indentation+4) << "return #{output_var};\n";
30
- output << ' '*indentation << @children.last
30
+ output << ' '*indentation << @children.last.strip.delete_suffix(';')
31
31
  output << ", #{append}, true, __promises, #{global_output_var});\n"
32
32
 
33
33
  output
data/lib/ejx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module EJX
2
- VERSION = '0.2'
2
+ VERSION = '1.0'
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: '0.2'
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.1.4
112
+ rubygems_version: 3.2.3
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: EJX Template Compiler