Skip to content

Commit

Permalink
fix bug of font-name, etc insnide font block
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Dec 28, 2024
1 parent 6b59132 commit 5f62640
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions src/generator_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ void generator_code_layout_value(hashmap_t *attrs, hashmap_t *new_attrs,
return;
}

if (attribute->final_key == NULL) {
attribute->final_key = string_strdup(attribute->key);
}
// comment it mate
// if (attribute->final_key == NULL) {
// attribute->final_key = string_strdup(attribute->key);
// }

if (attribute->final_value == NULL) {
attribute->final_value = string_strdup(
Expand Down Expand Up @@ -487,9 +488,14 @@ void generator_code_head_meta_children(generator_t *generator,
ast_layout_attribute_t *attribute =
cast(ast_layout_attribute_t *, entry->value);

if (attribute->final_key == NULL) {
attribute->final_key = string_strdup(attribute->key);
}
generator_code_layout_value(node_block->attributes,
node_block->attributes,
attribute);

// comment it mate
// if (attribute->final_key == NULL) {
// attribute->final_key = string_strdup(attribute->key);
// }

string_append_str(
generator->css,
Expand Down Expand Up @@ -755,9 +761,10 @@ string_t *generator_code_layout_attributes(generator_t *generator,
string_append_char(html_attributes, ' ');
}

if (attribute->final_key == NULL) {
attribute->final_key = string_strdup(attribute->key);
}
// comment it mate
// if (attribute->final_key == NULL) {
// attribute->final_key = string_strdup(attribute->key);
// }

string_append_str(
html_attributes,
Expand Down Expand Up @@ -1004,10 +1011,11 @@ string_t *generator_code_layout_attributes(generator_t *generator,
string_append_char(generator->media_css, ';');
}

if (attribute->final_key == NULL) {
attribute->final_key =
string_strdup(attribute->key);
}
// comment it mate
// if (attribute->final_key == NULL) {
// attribute->final_key =
// string_strdup(attribute->key);
// }

string_append_str(generator->media_css,
attribute->final_key);
Expand Down

0 comments on commit 5f62640

Please sign in to comment.