add string property to all texts to avoid table ambiguity

This commit is contained in:
Felix Kratz 2023-03-05 19:01:48 +01:00
parent c406cfab4d
commit 52183c8159
2 changed files with 4 additions and 1 deletions

View file

@ -59,6 +59,7 @@
#define PROPERTY_DISTANCE "distance"
#define PROPERTY_ANGLE "angle"
#define PROPERTY_SCALE "scale"
#define PROPERTY_STRING "string"
#define PROPERTY_UPDATES "updates"
#define PROPERTY_POSITION "position"

View file

@ -449,7 +449,9 @@ bool text_parse_sub_domain(struct text* text, FILE* rsp, struct token property,
char prev = text->align;
text->align = get_token(&message).text[0];
return prev != text->align;
}
} else if (token_equals(property, PROPERTY_STRING)) {
return text_set_string(text, token_to_string(get_token(&message)), false);
}
else {
struct key_value_pair key_value_pair = get_key_value_pair(property.text, '.');
if (key_value_pair.key && key_value_pair.value) {