mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 05:22:40 +00:00
Implement suggested fix for 3488
Per issue
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-depth */
|
||||||
/* eslint-disable max-lines */
|
/* eslint-disable max-lines */
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Parser as MathParser } from 'expr-eval';
|
import { Parser as MathParser } from 'expr-eval';
|
||||||
@@ -680,7 +681,7 @@ function MarkedVariables() {
|
|||||||
}
|
}
|
||||||
if(match[8]) { // Inline Definition
|
if(match[8]) { // Inline Definition
|
||||||
const label = match[10] ? match[10].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
|
const label = match[10] ? match[10].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
|
||||||
let content = match[11] ? match[11].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
|
let content = match[11] ? match[11] : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
|
||||||
|
|
||||||
// In case of nested (), find the correct matching end )
|
// In case of nested (), find the correct matching end )
|
||||||
let level = 0;
|
let level = 0;
|
||||||
@@ -696,10 +697,8 @@ function MarkedVariables() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(i > -1) {
|
combinedRegex.lastIndex = combinedRegex.lastIndex - (content.length - i);
|
||||||
combinedRegex.lastIndex = combinedRegex.lastIndex - (content.length - i);
|
content = content.slice(0, i).trim().replace(/\s+/g, ' ');
|
||||||
content = content.slice(0, i).trim().replace(/\s+/g, ' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
varsQueue.push(
|
varsQueue.push(
|
||||||
{ type : 'varDefBlock',
|
{ type : 'varDefBlock',
|
||||||
|
|||||||
Reference in New Issue
Block a user