Skip to content

Commit

Permalink
add string property to all texts to avoid table ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixKratz committed Mar 5, 2023
1 parent c406cfa commit 52183c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/misc/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion src/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 52183c8

Please sign in to comment.