Home / Function/ reg_exp_entity() — svelte Function Reference

reg_exp_entity() — svelte Function Reference

Architecture documentation for the reg_exp_entity() function in html.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  0e98e2b4_8bd8_533f_5e5b_6aa5b6a0c37b["reg_exp_entity()"]
  06660fad_daa2_c824_01c8_ebafc63758a1["html.js"]
  0e98e2b4_8bd8_533f_5e5b_6aa5b6a0c37b -->|defined in| 06660fad_daa2_c824_01c8_ebafc63758a1
  44da9850_1da6_da01_f162_bd91cf8c7ff8["get_entity_pattern()"]
  44da9850_1da6_da01_f162_bd91cf8c7ff8 -->|calls| 0e98e2b4_8bd8_533f_5e5b_6aa5b6a0c37b
  style 0e98e2b4_8bd8_533f_5e5b_6aa5b6a0c37b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/1-parse/utils/html.js lines 12–19

function reg_exp_entity(entity_name, is_attribute_value) {
	// https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
	// doesn't decode the html entity which not ends with ; and next character is =, number or alphabet in attribute value.
	if (is_attribute_value && !entity_name.endsWith(';')) {
		return `${entity_name}\\b(?!=)`;
	}
	return entity_name;
}

Domain

Subdomains

Frequently Asked Questions

What does reg_exp_entity() do?
reg_exp_entity() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/1-parse/utils/html.js.
Where is reg_exp_entity() defined?
reg_exp_entity() is defined in packages/svelte/src/compiler/phases/1-parse/utils/html.js at line 12.
What calls reg_exp_entity()?
reg_exp_entity() is called by 1 function(s): get_entity_pattern.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free