Changed order of resolver fields
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user