@emmetio/abbreviation
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -282,5 +282,5 @@ 'use strict'; | ||
} | ||
// for convenience, groups can be joined with optional `+` operator | ||
stream.eat(OP_SIBLING); | ||
} | ||
// for convenience, groups can be joined with optional `+` operator | ||
stream.eat(OP_SIBLING); | ||
@@ -345,12 +345,19 @@ continue; | ||
for (let i = 1; i < node.repeat.count; i++) { | ||
for (let i = 0; i < node.repeat.count; i++) { | ||
const clone = node.clone(true); | ||
clone.repeat.value = i; | ||
clone.repeat.value = i+1; | ||
clone.walk(unroll); | ||
node.parent.insertBefore(clone, node); | ||
if (clone.isGroup) { | ||
while (clone.children.length > 0) { | ||
clone.firstChild.repeat = clone.repeat; | ||
node.parent.insertBefore(clone.firstChild, node); | ||
} | ||
} else { | ||
node.parent.insertBefore(clone, node); | ||
} | ||
} | ||
node.repeat.value = node.repeat.count; | ||
node.parent.removeChild(node); | ||
} | ||
module.exports = index; |
@@ -278,5 +278,5 @@ import Node from '@emmetio/node'; | ||
} | ||
// for convenience, groups can be joined with optional `+` operator | ||
stream.eat(OP_SIBLING); | ||
} | ||
// for convenience, groups can be joined with optional `+` operator | ||
stream.eat(OP_SIBLING); | ||
@@ -341,12 +341,19 @@ continue; | ||
for (let i = 1; i < node.repeat.count; i++) { | ||
for (let i = 0; i < node.repeat.count; i++) { | ||
const clone = node.clone(true); | ||
clone.repeat.value = i; | ||
clone.repeat.value = i+1; | ||
clone.walk(unroll); | ||
node.parent.insertBefore(clone, node); | ||
if (clone.isGroup) { | ||
while (clone.children.length > 0) { | ||
clone.firstChild.repeat = clone.repeat; | ||
node.parent.insertBefore(clone.firstChild, node); | ||
} | ||
} else { | ||
node.parent.insertBefore(clone, node); | ||
} | ||
} | ||
node.repeat.value = node.repeat.count; | ||
node.parent.removeChild(node); | ||
} | ||
export default index; |
{ | ||
"name": "@emmetio/abbreviation", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Emmet standalone abbreviation parser", | ||
@@ -5,0 +5,0 @@ "main": "dist/abbreviation.cjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23505
616