First version of a delete button, is working

This commit is contained in:
Pieter Vander Vennet 2021-07-03 14:35:44 +02:00
parent de5f8f95bb
commit e4c29ce660
13 changed files with 309 additions and 136 deletions

View file

@ -9,8 +9,11 @@ import SubstitutingTag from "../../Logic/Tags/SubstitutingTag";
export class FromJSON {
public static SimpleTag(json: string): Tag {
public static SimpleTag(json: string, context?: string): Tag {
const tag = Utils.SplitFirst(json, "=");
if(tag.length !== 2){
throw `Invalid tag: no (or too much) '=' found (in ${context ?? "unkown context"})`
}
return new Tag(tag[0], tag[1]);
}