Skip to content

Commit

Permalink
accepting content for layout and mother tags, we also accepts this at…
Browse files Browse the repository at this point in the history
…tr for some single element such as input
  • Loading branch information
BaseMax committed Dec 25, 2024
1 parent 335fe31 commit a8b74a2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ bool token_belongs_to_ast_layout_node(
ast_layout_attribute_t *attribute) {
DEBUG_ME;

if (attribute_key_type == AST_LAYOUT_ATTRIBUTE_TYPE_CONTENT) {
return is_layout_node_a_single_tag(attribute->parent_node_type) ? false : true;
} else if (attribute->parent_node_type == AST_LAYOUT_TYPE_INCLUDE &&
if (attribute->parent_node_type == AST_LAYOUT_TYPE_INCLUDE &&
(attribute_key_type == AST_LAYOUT_ATTRIBUTE_TYPE_SRC ||
attribute_key_type == AST_LAYOUT_ATTRIBUTE_TYPE_REPEAT))
{
Expand All @@ -195,6 +193,10 @@ bool token_belongs_to_ast_layout_node(
if (false) {
}
#include "generated-config/ast_layout_type_attributes.h"

if (attribute_key_type == AST_LAYOUT_ATTRIBUTE_TYPE_CONTENT) {
return is_layout_node_a_single_tag(attribute->parent_node_type) ? false : true;
}

return false;
}

0 comments on commit a8b74a2

Please sign in to comment.