Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: delete gumbo_normalize_svg_tagname #3402

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions gumbo-parser/src/nokogiri_gumbo.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,21 +318,6 @@ const char* gumbo_normalized_tagname(GumboTag tag);
*/
void gumbo_tag_from_original_text(GumboStringPiece* text);

/**
* Fixes the case of SVG elements that are not all lowercase. This is
* not done at parse time because there's no place to store a mutated
* tag name. `tag_name` is an enum (which will be `TAG_UNKNOWN` for most
* SVG tags without special handling), while `original_tag_name` is a
* pointer into the original buffer. Instead, we provide this helper
* function that clients can use to rename SVG tags as appropriate.
* Returns the case-normalized SVG tagname if a replacement is found, or
* `NULL` if no normalization is called for. The return value is static
* data and owned by the library.
*
* @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
*/
const char* gumbo_normalize_svg_tagname(const GumboStringPiece* tagname);

/**
* Converts a tag name string (which may be in upper or mixed case) to a
* tag enum.
Expand Down
8 changes: 0 additions & 8 deletions gumbo-parser/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1962,14 +1962,6 @@ static void merge_attributes (
#endif
}

const char* gumbo_normalize_svg_tagname(const GumboStringPiece* tag) {
const StringReplacement *replacement = gumbo_get_svg_tag_replacement (
tag->data,
tag->length
);
return replacement ? replacement->to : NULL;
}

// https://html.spec.whatwg.org/multipage/parsing.html#adjust-foreign-attributes
// This destructively modifies any matching attributes on the token and sets the
// namespace appropriately.
Expand Down
Loading