0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-14 19:22:52 +00:00

remove console.log

This commit is contained in:
Trevor Buckner
2024-02-13 00:53:34 -05:00
parent 29f0a8e635
commit 3bda834ad3

View File

@@ -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,14 +440,16 @@ 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,
resolved : resolved resolved : resolved
@@ -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',