Photon 1.0.0
|
#include "gumbo.h"
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include "tag_strings.h"
#include "tag_sizes.h"
#include "tag_gperf.h"
Macros | |
#define | TAG_MAP_SIZE (sizeof(kGumboTagMap) / sizeof(kGumboTagMap[0])) |
Functions | |
const char * | gumbo_normalized_tagname (GumboTag tag) |
void | gumbo_tag_from_original_text (GumboStringPiece *text) |
GumboTag | gumbo_tagn_enum (const char *tagname, unsigned int length) |
GumboTag | gumbo_tag_enum (const char *tagname) |
Variables | |
const char * | kGumboTagNames [] |
#define TAG_MAP_SIZE (sizeof(kGumboTagMap) / sizeof(kGumboTagMap[0])) |
const char * gumbo_normalized_tagname | ( | GumboTag | tag | ) |
Returns the normalized (usually all-lowercased, except for foreign content) tag name for an GumboTag enum. Return value is static data owned by the library.
GumboTag gumbo_tag_enum | ( | const char * | tagname | ) |
Converts a tag name string (which may be in upper or mixed case) to a tag enum. The tag
version expects tagname
to be NULL-terminated
void gumbo_tag_from_original_text | ( | GumboStringPiece * | text | ) |
Extracts the tag name from the original_text field of an element or token by stripping off </> characters and attributes and adjusting the passed-in GumboStringPiece appropriately. The tag name is in the original case and shares a buffer with the original text, to simplify memory management. Behavior is undefined if a string-piece that doesn't represent an HTML tag (<tagname> or </tagname>) is passed in. If the string piece is completely empty (NULL data pointer), then this function will exit successfully as a no-op.
GumboTag gumbo_tagn_enum | ( | const char * | tagname, |
unsigned int | length | ||
) |
const char* kGumboTagNames[] |