From 760269a6e1f2e75680547f3e59599da9aff6b582 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Jan 2024 00:11:52 -0500 Subject: [PATCH] Fix math and inline defs getting lowercased --- shared/naturalcrit/markdown.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 38e6a7ef0..a95f08527 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -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',