removed test code

This commit is contained in:
Will Abbott 2025-01-10 13:17:59 +00:00
parent bb6767bdb3
commit 1fbcae4076

View file

@ -7,22 +7,7 @@ class Tag:
r"<(/?)c-([^\s/>]+)((?:\s+[^\s/>\"'=<>`]+(?:\s*=\s*(?:\"[^\"]*\"|'[^']*'|\S+))?)*)\s*(/?)\s*>",
re.DOTALL,
)
# attr_pattern = re.compile(r'([^\s/>\"\'=<>`]+)(?:\s*=\s*(?:(["\'])(.*?)\2|(\S+)))?', re.DOTALL)
attr_pattern = re.compile(
r"""([^\s/>\"\'=<>`]+) # Attribute name
(?: # Optional group for value
\s*=\s* # Equals with optional whitespace
(?:
(["\']) # Quote character
((?:(?!\2)|.)*?) # Any character that's not the quote character
\2 # Matching quote
| # OR
(\S+) # Non-quoted value without spaces
)
)?""",
re.VERBOSE | re.DOTALL,
)
attr_pattern = re.compile(r'([^\s/>\"\'=<>`]+)(?:\s*=\s*(?:(["\'])(.*?)\2|(\S+)))?', re.DOTALL)
def __init__(self, match: re.Match):
self.html = match.group(0)