Changed order of resolver fields

This commit is contained in:
2024-08-21 14:23:06 -06:00
parent e5f3cb0c34
commit f6fc85bf7e
3 changed files with 13 additions and 7 deletions

View File

@@ -3,9 +3,15 @@ import { sum } from "./utils/sum";
export class Dice {
private count!: number;
private sides!: number;
private diceString: string;
toString() {
return this.diceString;
}
constructor(dice: string) {
this.parseDice(dice);
this.diceString = dice;
}
private parseDice(dice: string) {

View File

@@ -802,11 +802,11 @@ export const buildOnlyDefaultElements = () => {
// on-demand resolver
registerIdentifier(
"on-demand resolver",
/\?\?\[.*?\](\(.*?\))?<<(.*?)>>/g,
/\?\?\[.*?\]\(.*?\)<<(.*?)>>/g,
(s) => {
const inp = s.match(/(?<=<<)(.*?)(?=>>)/)![0];
const template = s.match(/(?<=\?\?\[)(.*?)(?=\])/)![0];
const title = s.match(/(?<=\]\()(.*?)(?=\))/)?.at(0);
const title = s.match(/(?<=\?\?\[)(.*?)(?=\])/)![0];
const template = s.match(/(?<=\]\()(.*?)(?=\))/)![0];
if (inp == undefined)
return {
content: "Error parsing resolver: " + s,