rip-lang 3.13.21 → 3.13.22
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.
- package/README.md +1 -1
- package/docs/dist/rip.js +16 -3
- package/docs/dist/rip.min.js +29 -29
- package/docs/dist/rip.min.js.br +0 -0
- package/package.json +1 -1
- package/src/components.js +11 -1
package/docs/dist/rip.min.js.br
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/components.js
CHANGED
|
@@ -397,7 +397,17 @@ export function installComponentSupport(CodeGenerator, Lexer) {
|
|
|
397
397
|
// ─────────────────────────────────────────────────────────────────────
|
|
398
398
|
// Implicit nesting (inject -> before INDENT)
|
|
399
399
|
// ─────────────────────────────────────────────────────────────────────
|
|
400
|
-
if (nextToken && nextToken[0] === 'INDENT'
|
|
400
|
+
if (nextToken && nextToken[0] === 'INDENT') {
|
|
401
|
+
// Skip fromThen INDENTs inside string interpolation (e.g. "#{if x then y else z}")
|
|
402
|
+
if (nextToken.fromThen) {
|
|
403
|
+
let depth = 0;
|
|
404
|
+
for (let j = i; j >= 0; j--) {
|
|
405
|
+
let jt = tokens[j][0];
|
|
406
|
+
if (jt === 'INTERPOLATION_END' || jt === 'STRING_END') depth++;
|
|
407
|
+
if (jt === 'INTERPOLATION_START' || jt === 'STRING_START') depth--;
|
|
408
|
+
if (depth < 0) { return 1; }
|
|
409
|
+
}
|
|
410
|
+
}
|
|
401
411
|
if (tag === '->' || tag === '=>' || tag === 'CALL_START' || tag === '(') {
|
|
402
412
|
return 1;
|
|
403
413
|
}
|