This commit is contained in:
CrazyMax 2021-03-27 12:47:35 +01:00
parent 19618bde61
commit b171e9c8ea
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
5 changed files with 252 additions and 46 deletions

View file

@ -70,7 +70,7 @@ export function Parse(s: string): Tag {
const parts = field.toString().split('=', 2);
if (parts.length == 1) {
tag.attrs['value'] = parts[0].trim();
} else if (parts.length == 2) {
} else {
const key = parts[0].trim().toLowerCase();
const value = parts[1].trim();
switch (key) {
@ -86,8 +86,6 @@ export function Parse(s: string): Tag {
break;
}
}
} else {
throw new Error(`Invalid entry: ${field}`);
}
}