mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 17:52:47 +00:00
Fix math and inline defs getting lowercased
This commit is contained in:
@@ -279,7 +279,7 @@ const replaceVar = function(input, hoist=false) {
|
|||||||
const match = regex.exec(input);
|
const match = regex.exec(input);
|
||||||
|
|
||||||
const prefix = match[1];
|
const prefix = match[1];
|
||||||
const label = match[2];
|
const label = match[2].toLowerCase();
|
||||||
|
|
||||||
let missingValues = [];
|
let missingValues = [];
|
||||||
|
|
||||||
@@ -485,8 +485,8 @@ const varDefInline = {
|
|||||||
const regex = /^\n?([!$]?)\[((?!\s*\])(?:\\.|[^\[\]\\])+)\]:\((.+?)\)/;
|
const regex = /^\n?([!$]?)\[((?!\s*\])(?:\\.|[^\[\]\\])+)\]:\((.+?)\)/;
|
||||||
const match = regex.exec(src);
|
const match = regex.exec(src);
|
||||||
if(match) {
|
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 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().toLowerCase().replace(/\s+/g, ' ') : 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 {
|
return {
|
||||||
type : 'varDefInline',
|
type : 'varDefInline',
|
||||||
|
|||||||
Reference in New Issue
Block a user