0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 09:12:45 +00:00

Fix math and inline defs getting lowercased

This commit is contained in:
Trevor Buckner
2024-01-19 00:11:52 -05:00
parent 79e8dfec18
commit 760269a6e1

View File

@@ -279,7 +279,7 @@ const replaceVar = function(input, hoist=false) {
const match = regex.exec(input);
const prefix = match[1];
const label = match[2];
const label = match[2].toLowerCase();
let missingValues = [];
@@ -485,8 +485,8 @@ const varDefInline = {
const regex = /^\n?([!$]?)\[((?!\s*\])(?:\\.|[^\[\]\\])+)\]:\((.+?)\)/;
const match = regex.exec(src);
if(match) {
const label = match[2] ? match[2].trim().toLowerCase().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
const content = match[3] ? match[3].trim().toLowerCase().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
const label = match[2] ? match[2].trim().replace(/\s+/g, ' ').toLowerCase() : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
const content = match[3] ? match[3].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
return {
type : 'varDefInline',