From 13fbcd0eb1b0991b9fa7798af946287882ddffa1 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 6 Feb 2024 23:29:59 -0600 Subject: [PATCH] Improve Regex to permit DTs with a final : --- shared/naturalcrit/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index f888cade8..9d981fd47 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -293,7 +293,7 @@ const blockDefinitionLists = { level : 'block', start(src) { return src.match(/^.*?::.*\n\n/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { - const regex = /^([^:\n]*?)[\n]?::(.*)(?:\n|$)|^.*(?:\n|$)/ym; + const regex = /^([^\n]*?:?)\n?::(.*)(?:\n|$)|^.*(?:\n|$)/ym; let match; let endIndex = 0; const allDefinitions = [];