mirror of
https://github.com/wrabit/django-cotton.git
synced 2025-09-09 16:20:33 +00:00
removed test code
This commit is contained in:
parent
bb6767bdb3
commit
1fbcae4076
1 changed files with 1 additions and 16 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue