mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-14 17:12:40 +00:00
remove console.log
This commit is contained in:
@@ -421,10 +421,10 @@ const lookupVar = function(label, index, hoist=false) {
|
|||||||
const processVariableQueue = function() {
|
const processVariableQueue = function() {
|
||||||
let resolvedOne = true;
|
let resolvedOne = true;
|
||||||
let finalLoop = false;
|
let finalLoop = false;
|
||||||
|
let loopcount = 0;
|
||||||
while (resolvedOne || finalLoop) { // Loop through queue until no more variable calls can be resolved
|
while (resolvedOne || finalLoop) { // Loop through queue until no more variable calls can be resolved
|
||||||
resolvedOne = false;
|
resolvedOne = false;
|
||||||
|
loopcount += 1;
|
||||||
for (const item of linksQueue) {
|
for (const item of linksQueue) {
|
||||||
if(item.type == 'text')
|
if(item.type == 'text')
|
||||||
continue;
|
continue;
|
||||||
@@ -440,13 +440,15 @@ const processVariableQueue = function() {
|
|||||||
if(value.missingValues.length > 0) {
|
if(value.missingValues.length > 0) {
|
||||||
resolved = false;
|
resolved = false;
|
||||||
} else {
|
} else {
|
||||||
item.content = item.content.replaceAll(match[0], value.value);
|
tempContent = tempContent.replaceAll(match[0], value.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(resolved == true || item.content != tempContent) {
|
if(resolved == true || item.content != tempContent) {
|
||||||
resolvedOne = true;
|
resolvedOne = true;
|
||||||
|
item.content = tempContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
globalLinks[globalPageNumber][item.varName] = {
|
globalLinks[globalPageNumber][item.varName] = {
|
||||||
content : item.content,
|
content : item.content,
|
||||||
@@ -552,14 +554,10 @@ function MarkedVariables() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(content)
|
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
console.log(match.lastIndex)
|
|
||||||
combinedRegex.lastIndex = combinedRegex.lastIndex - (content.length - i);
|
combinedRegex.lastIndex = combinedRegex.lastIndex - (content.length - i);
|
||||||
console.log(match.lastIndex)
|
|
||||||
content = content.slice(0,i).trim().replace(/\s+/g, ' ');
|
content = content.slice(0,i).trim().replace(/\s+/g, ' ');
|
||||||
}
|
}
|
||||||
console.log(content)
|
|
||||||
|
|
||||||
linksQueue.push(
|
linksQueue.push(
|
||||||
{ type : 'varDefBlock',
|
{ type : 'varDefBlock',
|
||||||
|
|||||||
Reference in New Issue
Block a user