theme-check 1.9.1 → 1.9.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: 39a4bbf1f8a394045deecb8e3b4ccf5cb94f0cfac1e36de7761670a2bb817f7a
4
- data.tar.gz: 66cd6e3ae2087b468019a8257e0dd8eded88ff2f2732fa2b1902328ef837ce10
3
+ metadata.gz: c667ad2be8d10ffe3ded0b949e5ceb4372350462addcfa0f4ecc30b575b3a1cf
4
+ data.tar.gz: 0ce4f520a0992413b151d2a2d607d81848ed151e6bb0d71ebd154978b44ffd28
5
5
  SHA512:
6
- metadata.gz: 59144f60da497b0c067218c7408e217fc9af86dbc7b150d7c4aedd06fd07a16442a270e21f0dfba048cb3a85de423efcaea4db67eecc0b7ebc14a3293bcf23e2
7
- data.tar.gz: f27e64b460ef9d30ef11b01a4638bb32184a5b1ade3f7279043e2bb6de1749c2778d25d4e056012f6a90f4628acd05d2e35d81c697cb01c3898de081022766e4
6
+ metadata.gz: 4a3b48d0bc8e896385bdf838e6e6e722e7a960f20af11987a51771c8203da2c39fc76ac97c9621da3c807efe2eca13b7599466f12c086785b3c3812cdd5351dc
7
+ data.tar.gz: 39daf33306825516b5316356c1ea8a2523cbe7c0b1406fa988d46d50d94356815d817b9a24f6e2c373a3041f6ac0856e186d160104590948c27291333a1c2a03
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ v1.9.2 / 2021-12-13
3
+ ===================
4
+
5
+ * Improve HTML parsing errors
6
+
2
7
  v1.9.1 / 2021-12-09
3
8
  ===================
4
9
 
@@ -140,9 +140,32 @@ module ThemeCheck
140
140
  end
141
141
 
142
142
  def parseable_markup
143
+ return @parseable_source if @value.name == "#document-fragment"
144
+
143
145
  start_index = from_row_column_to_index(@parseable_source, line_number - 1, 0)
144
146
  @parseable_source
145
- .match(/<\s*#{@value.name}[^>]*>/im, start_index)[0]
147
+ .match(/<\s*#{name}[^>]*>/im, start_index)[0]
148
+ rescue NoMethodError
149
+ # Don't know what's up with the following issue. Don't think
150
+ # null check is correct approach. This should give us more info.
151
+ # https://github.com/Shopify/theme-check/issues/528
152
+ ThemeCheck.bug(<<~MSG)
153
+ Can't find a parseable tag of name #{name} inside the parseable HTML.
154
+
155
+ Tag name:
156
+ #{@value.name.inspect}
157
+
158
+ File:
159
+ #{@theme_file.relative_path}
160
+
161
+ Line number:
162
+ #{line_number}
163
+
164
+ Excerpt:
165
+ ```
166
+ #{@parseable_source.lines[line_number - 1...line_number + 5]}
167
+ ```
168
+ MSG
146
169
  end
147
170
 
148
171
  def content
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ThemeCheck
3
- VERSION = "1.9.1"
3
+ VERSION = "1.9.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theme-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Cournoyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-09 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid