diff options
Diffstat (limited to 'lib/skin_parser/skin_parser.c')
-rw-r--r-- | lib/skin_parser/skin_parser.c | 65 |
1 files changed, 60 insertions, 5 deletions
diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index 44a1c03245..a81bcded34 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c | |||
@@ -182,12 +182,26 @@ static struct skin_element* skin_parse_viewport(const char** document) | |||
182 | } | 182 | } |
183 | else if(*cursor == TAGSYM) | 183 | else if(*cursor == TAGSYM) |
184 | { | 184 | { |
185 | skip_tag(&cursor); | 185 | /* A ';' directly after a '%' doesn't count */ |
186 | cursor ++; | ||
187 | |||
188 | if(*cursor == '\0') | ||
189 | break; | ||
190 | |||
191 | cursor++; | ||
186 | } | 192 | } |
187 | else if(*cursor == COMMENTSYM) | 193 | else if(*cursor == COMMENTSYM) |
188 | { | 194 | { |
189 | skip_comment(&cursor); | 195 | skip_comment(&cursor); |
190 | } | 196 | } |
197 | else if(*cursor == ARGLISTOPENSYM) | ||
198 | { | ||
199 | skip_arglist(&cursor); | ||
200 | } | ||
201 | else if(*cursor == ENUMLISTOPENSYM) | ||
202 | { | ||
203 | skip_enumlist(&cursor); | ||
204 | } | ||
191 | else | 205 | else |
192 | { | 206 | { |
193 | /* Advancing the cursor as normal */ | 207 | /* Advancing the cursor as normal */ |
@@ -431,9 +445,20 @@ static struct skin_element* skin_parse_sublines_optional(const char** document, | |||
431 | { | 445 | { |
432 | skip_comment(&cursor); | 446 | skip_comment(&cursor); |
433 | } | 447 | } |
448 | else if(*cursor == ENUMLISTOPENSYM) | ||
449 | { | ||
450 | skip_enumlist(&cursor); | ||
451 | } | ||
452 | else if(*cursor == ARGLISTOPENSYM) | ||
453 | { | ||
454 | skip_arglist(&cursor); | ||
455 | } | ||
434 | else if(*cursor == TAGSYM) | 456 | else if(*cursor == TAGSYM) |
435 | { | 457 | { |
436 | skip_tag(&cursor); | 458 | cursor++; |
459 | if(*cursor == '\0' || *cursor == '\n') | ||
460 | break; | ||
461 | cursor++; | ||
437 | } | 462 | } |
438 | else if(*cursor == MULTILINESYM) | 463 | else if(*cursor == MULTILINESYM) |
439 | { | 464 | { |
@@ -570,12 +595,19 @@ static int skin_parse_tag(struct skin_element* element, const char** document) | |||
570 | /* Skipping over escaped characters */ | 595 | /* Skipping over escaped characters */ |
571 | if(*cursor == TAGSYM) | 596 | if(*cursor == TAGSYM) |
572 | { | 597 | { |
573 | skip_tag(&cursor); | 598 | cursor++; |
599 | if(*cursor == '\0') | ||
600 | break; | ||
601 | cursor++; | ||
574 | } | 602 | } |
575 | else if(*cursor == COMMENTSYM) | 603 | else if(*cursor == COMMENTSYM) |
576 | { | 604 | { |
577 | skip_comment(&cursor); | 605 | skip_comment(&cursor); |
578 | } | 606 | } |
607 | else if(*cursor == ARGLISTOPENSYM) | ||
608 | { | ||
609 | skip_arglist(&cursor); | ||
610 | } | ||
579 | else if(*cursor == ARGLISTSEPARATESYM) | 611 | else if(*cursor == ARGLISTSEPARATESYM) |
580 | { | 612 | { |
581 | num_args++; | 613 | num_args++; |
@@ -942,9 +974,18 @@ static int skin_parse_conditional(struct skin_element* element, const char** doc | |||
942 | { | 974 | { |
943 | skip_comment(&cursor); | 975 | skip_comment(&cursor); |
944 | } | 976 | } |
977 | else if(*cursor == ENUMLISTOPENSYM) | ||
978 | { | ||
979 | if (*cursor == '\n') | ||
980 | cursor++; | ||
981 | skip_enumlist(&cursor); | ||
982 | } | ||
945 | else if(*cursor == TAGSYM) | 983 | else if(*cursor == TAGSYM) |
946 | { | 984 | { |
947 | skip_tag(&cursor); | 985 | cursor++; |
986 | if(*cursor == '\0' || *cursor == '\n') | ||
987 | break; | ||
988 | cursor++; | ||
948 | } | 989 | } |
949 | else if(*cursor == ENUMLISTSEPARATESYM) | 990 | else if(*cursor == ENUMLISTSEPARATESYM) |
950 | { | 991 | { |
@@ -1098,7 +1139,21 @@ static struct skin_element* skin_parse_code_as_arg(const char** document) | |||
1098 | } | 1139 | } |
1099 | else if(*cursor == TAGSYM) | 1140 | else if(*cursor == TAGSYM) |
1100 | { | 1141 | { |
1101 | skip_tag(&cursor); | 1142 | /* A ';' directly after a '%' doesn't count */ |
1143 | cursor ++; | ||
1144 | |||
1145 | if(*cursor == '\0') | ||
1146 | break; | ||
1147 | |||
1148 | cursor++; | ||
1149 | } | ||
1150 | else if(*cursor == ARGLISTOPENSYM) | ||
1151 | { | ||
1152 | skip_arglist(&cursor); | ||
1153 | } | ||
1154 | else if(*cursor == ENUMLISTOPENSYM) | ||
1155 | { | ||
1156 | skip_enumlist(&cursor); | ||
1102 | } | 1157 | } |
1103 | else | 1158 | else |
1104 | { | 1159 | { |