0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 00:42:40 +00:00

Improve Regex to permit DTs with a final :

This commit is contained in:
David Bolack
2024-02-06 23:29:59 -06:00
parent 43b9f3d901
commit 13fbcd0eb1

View File

@@ -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 = [];