ttcMD: fixed rx for grid. Oopsie
This commit is contained in:
parent
4245eff43e
commit
192479020d
@ -37,7 +37,7 @@ TokenIdentifiers.set("grid", {
|
||||
const closeRx = /\/\[\]/g;
|
||||
return search(s, start, end, rx, closeRx);
|
||||
},
|
||||
rx: /(?:\[\])+\n+((?:.|\n)*?)\n+\/\[\]/g,
|
||||
rx: /(?<!\/)(?:\[\])+\n+((?:.|\n)*?)\n+\/\[\]/g,
|
||||
parse(s) {
|
||||
const rx = /((?:\[\])+)\n+([\s\S]*)\n+\/\[\]/;
|
||||
const [_, columns, content] = s.match(rx) ||
|
||||
@ -291,9 +291,19 @@ TokenIdentifiers.set("hr", {
|
||||
},
|
||||
});
|
||||
|
||||
// const p = TokenIdentifiers.get("p");
|
||||
// TokenIdentifiers.clear();
|
||||
// p && TokenIdentifiers.set("p", p);
|
||||
TokenIdentifiers.set("comment", {
|
||||
rx: /<!--[\s\S]+?-->/g,
|
||||
parse(s) {
|
||||
return {
|
||||
content: "",
|
||||
metadata: { comment: s },
|
||||
raw: "",
|
||||
type: "comment",
|
||||
uuid: crypto.randomUUID(),
|
||||
rendersContentOnly,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
function findMatchingClosedParenthesis(
|
||||
str: string,
|
||||
@ -358,11 +368,12 @@ function search(
|
||||
|
||||
const newEnd = findMatchingClosedParenthesis(
|
||||
s,
|
||||
// s.substring(0, end - start),
|
||||
openRx,
|
||||
closeRx,
|
||||
);
|
||||
|
||||
if (newEnd === null) throw Error("BAD BAD BAD BAD");
|
||||
if (newEnd === null) throw Error("There was an issue finding a closing tag");
|
||||
|
||||
end = newEnd + start;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user