Commit 09511420 authored by Julie Blanc's avatar Julie Blanc

onContent → create differents var (optimization)

parent d7f97cce
......@@ -43,50 +43,50 @@ class StringSets extends Handler {
funcNode.name = "var";
funcNode.children = new csstree.List();
if(this.type === "first"){
console.log(this.type);
funcNode.children.append(
funcNode.children.createItem({
type: "Identifier",
loc: null,
name: "--pagedjs-string-first-" + identifier
})
);
}
if(this.type === "last"){
if(this.type === "first" || "last" || "start" || "first-except"){
console.log(this.type);
funcNode.children.append(
funcNode.children.createItem({
type: "Identifier",
loc: null,
name: "--pagedjs-string-last-" + identifier
name: "--pagedjs-string-" + this.type + "-" + identifier
})
);
}
if(this.type === "start"){
console.log(this.type);
funcNode.children.append(
funcNode.children.createItem({
type: "Identifier",
loc: null,
name: "--pagedjs-string-start-" + identifier
})
);
}
if(this.type === "first-except"){
console.log(this.type);
funcNode.children.append(
funcNode.children.createItem({
type: "Identifier",
loc: null,
name: "--pagedjs-string-first-except" + identifier
})
);
}
// if(this.type === "last"){
// console.log(this.type);
// funcNode.children.append(
// funcNode.children.createItem({
// type: "Identifier",
// loc: null,
// name: "--pagedjs-string-last-" + identifier
// })
// );
// }
// if(this.type === "start"){
// console.log(this.type);
// funcNode.children.append(
// funcNode.children.createItem({
// type: "Identifier",
// loc: null,
// name: "--pagedjs-string-start-" + identifier
// })
// );
// }
// if(this.type === "first-except"){
// console.log(this.type);
// funcNode.children.append(
// funcNode.children.createItem({
// type: "Identifier",
// loc: null,
// name: "--pagedjs-string-first-except" + identifier
// })
// );
// }
// funcNode.children.append(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment