rbexy 0.1.1 → 0.1.2

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: de2d3389ec5f783be2e913921071bc0920baa342980360445e5756a8d6cd2d72
4
- data.tar.gz: 7dfdd99aa0852253e491889010f87c5a2ca828a57b16fe8749d9231135c785a2
3
+ metadata.gz: ffe916002997f23b1aab2e81aaf94cf8bab0083d8e47bd72eee204d8058a871f
4
+ data.tar.gz: fb54d1d98b6272c716059b4dcde6bafdc02baaf1025e79bdf2590a6ebdef148d
5
5
  SHA512:
6
- metadata.gz: a6e669a7babe4bb38c7a31be00c0a98d1035c1c7fec980b713a4bb17a2ba461c127745a7b7fee50f6419830eb7e26bf505243662c08245973fac4a3c0ce20dd4
7
- data.tar.gz: 91c71f51bd42958d86a5584a85a0a634fb35306e95e4a022bc82508c2d5d7cb05df901197d276a870bbcab19b6d1d632a0de4a43518d39f2dd9b00b08559f316
6
+ metadata.gz: 0c6590b2796a338efdef40dd2c6fe21b324c8397f8d79e3f4b2535a1d2ae522942b41cecc71d753e98c4df1beb88731c104fd742d1a5adfe903c8b9701a8a031
7
+ data.tar.gz: a182b48b4cd539e96d502ea4579bac7c8204bf0e1a840d8b62f931b63ddc682d45afb01d50aa3d6140dfd1d7d9b4f70ca631b48f8861d813a1dd1fd70fd973eb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbexy (0.1.0)
4
+ rbexy (0.1.2)
5
5
  actionview (>= 5.0, < 7.0)
6
6
  activesupport (>= 5.0, < 7.0)
7
7
  railties (>= 5.0, < 7.0)
@@ -115,7 +115,7 @@ module Rbexy
115
115
  expression_inner_single_quote
116
116
  elsif scanner.scan(Patterns.open_tag_def)
117
117
  potential_expression_inner_tag
118
- elsif scanner.scan(Patterns.expression_content)
118
+ elsif expression_content?
119
119
  self.curr_expr += scanner.matched
120
120
  else
121
121
  raise SyntaxError, self
@@ -132,7 +132,7 @@ module Rbexy
132
132
  expression_inner_single_quote
133
133
  elsif scanner.scan(Patterns.open_tag_def)
134
134
  potential_expression_inner_tag
135
- elsif scanner.scan(Patterns.expression_content)
135
+ elsif expression_content?
136
136
  self.curr_expr += scanner.matched
137
137
  else
138
138
  raise SyntaxError, self
@@ -237,6 +237,7 @@ module Rbexy
237
237
  end
238
238
 
239
239
  def potential_expression_inner_tag
240
+ # binding.pry
240
241
  if self.curr_expr =~ Patterns.expression_internal_tag_prefixes
241
242
  tokens << [:EXPRESSION_BODY, curr_expr]
242
243
  self.curr_expr = ""
@@ -275,5 +276,16 @@ module Rbexy
275
276
  self.curr_expr += scanner.getch
276
277
  stack.pop unless curr_expr.end_with?('\\')
277
278
  end
279
+
280
+ def expression_content?
281
+ # Patterns.expression_content ends at `<` characters, because we need to
282
+ # separately scan for allowed open_tag_defs within expressions. We should
283
+ # support any found open_tag_ends as expression content, as that means the
284
+ # open_tag_def was not considered allowed (or stack would be inside
285
+ # :tag_def instead of :expression) so we should thus also consider the
286
+ # open_tag_end to just be a part of the expression (maybe its in a string,
287
+ # etc).
288
+ scanner.scan(Patterns.expression_content) || scanner.scan(Patterns.open_tag_end)
289
+ end
278
290
  end
279
291
  end
@@ -1,3 +1,3 @@
1
1
  module Rbexy
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbexy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Giancola
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-06 00:00:00.000000000 Z
11
+ date: 2020-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport