tess_edit 0.5.16 → 0.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/javascript/tess_edit/core/liquid_check.js +3 -2
- data/lib/tess_edit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81bf024320e1b26b908b234509c20f2d3d0b28486246f677f697a73c004ec464
|
|
4
|
+
data.tar.gz: 6fee53efa892077a3ab1e55111de4d67a827f52091cff03e3c052bae15fc108f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba363c92cb29469719787c21fe62d2d4d2d0fa0c53d9d9764eee878e546ba5e675c9434335f45fb4a1bfb2c5f84de258e7946276743b893a8ceb93d2e8c7e312
|
|
7
|
+
data.tar.gz: 9fa13068fed9c8fe57d31f0abe2834a0f0aa981b5f1cf1600fc700e6c6af2217e7e812105ca7784fcbba74d653b1e8abdd40177de83f007764c99137a023672d
|
|
@@ -256,7 +256,7 @@ async function checkPath(path, context, local) {
|
|
|
256
256
|
if (!own) {
|
|
257
257
|
context.roots ||= await variables.options("", context.scope).catch(() => [])
|
|
258
258
|
if (!context.roots.length) return null
|
|
259
|
-
if (!context.roots.some((variable) => variable.name
|
|
259
|
+
if (!context.roots.some((variable) => [root, names[0]].includes(variable.name))) return { at: 0, length: root.length, message: t("There's no variable %{name}", { name: root }) }
|
|
260
260
|
}
|
|
261
261
|
// Each name after it, as far as its parent's variables are known
|
|
262
262
|
let at = names[0].length + 1
|
|
@@ -266,8 +266,9 @@ async function checkPath(path, context, local) {
|
|
|
266
266
|
if (!variable?.children) return null
|
|
267
267
|
const options = await variables.options(parent, scope).catch(() => [])
|
|
268
268
|
if (!options.length) return null
|
|
269
|
+
// A method's name may end in ? (screening.payment_needed?), as Liquid allows, with or without it
|
|
269
270
|
const name = names[i].replace(/\?$/, "")
|
|
270
|
-
if (name !== "size" && !options.some((option) => option.name
|
|
271
|
+
if (name !== "size" && !options.some((option) => [name, `${name}?`].includes(option.name))) return { at, length: names[i].length, message: t("%{path} has no %{name}", { path: parent, name }) }
|
|
271
272
|
at += names[i].length + 1
|
|
272
273
|
}
|
|
273
274
|
return null
|
data/lib/tess_edit/version.rb
CHANGED