erb_lint 0.0.22 → 0.0.23

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
  SHA1:
3
- metadata.gz: 1ec3e8e2ac9c73109d17f77b2e93a43e12f8c89e
4
- data.tar.gz: 116d80b17dcf0ff05f356dd21fbc34f3f3af4da6
3
+ metadata.gz: 11a6c2e365195f4de61cc8c922ba47cf085a752d
4
+ data.tar.gz: 2971a21c126ebb55a7967eab594640241c18f95e
5
5
  SHA512:
6
- metadata.gz: 300e58e388b3d6904b750bfeb2ea2576490204191a5160cd3e8929421ca47804b114f706c8cd3be96b2e22a27d8cef0a3d1970de18c4b54ed9611b16f2052874
7
- data.tar.gz: 9a02fefe7fecd0af7cba69ba7c3777a20c51af7c0621c6b3471538fad81a510806935e8a142b4233cafe96772add6960f8d7935668a7800c88db40da5c1b518a
6
+ metadata.gz: 2ce2e0316264a8faed982c6158a7b1a5853019f9c071b8d026b0dedd1e14d9270cc1d56734053b196f756c339e20af4a08904a168845c2e3d716e61e7a2e7eaa
7
+ data.tar.gz: cfe7c1f1b533427a56bcaabba1b46322ab1a5a22922ba15af6495b1e08715111914f29fe93008dfd09469e96c616bd7c4306212c4f1dc4e4a3632a925dd0e16a
@@ -23,7 +23,12 @@ module ERBLint
23
23
  next if indicator == '#'
24
24
  source = code_node.loc.source
25
25
 
26
- next unless (ruby_node = BetterHtml::TestHelper::RubyNode.parse(source))
26
+ ruby_node = begin
27
+ BetterHtml::TestHelper::RubyNode.parse(source)
28
+ rescue ::Parser::SyntaxError
29
+ nil
30
+ end
31
+ next unless ruby_node
27
32
  send_node = ruby_node.descendants(:send).first
28
33
  next unless send_node&.method_name?(:javascript_tag)
29
34
 
@@ -47,7 +47,7 @@ module ERBLint
47
47
  def bound(pos)
48
48
  [
49
49
  [pos, @bound_range.min].max,
50
- @bound_range.max
50
+ @bound_range.max,
51
51
  ].min
52
52
  end
53
53
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ERBLint
4
- VERSION = '0.0.22'
4
+ VERSION = '0.0.23'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erb_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Chan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-21 00:00:00.000000000 Z
11
+ date: 2018-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_html
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.6
19
+ version: 1.0.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.6
26
+ version: 1.0.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: html_tokenizer
29
29
  requirement: !ruby/object:Gem::Requirement