mirror of
https://github.com/django-components/django-components.git
synced 2025-08-08 16:27:59 +00:00
feat: replacepython html parser djc-core-html-parser (#929)
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
This commit is contained in:
parent
55bcc11f50
commit
b69c6e6624
10 changed files with 62 additions and 1501 deletions
|
@ -33,9 +33,9 @@ from django.templatetags.static import static
|
|||
from django.urls import path, reverse
|
||||
from django.utils.decorators import sync_and_async_middleware
|
||||
from django.utils.safestring import SafeString, mark_safe
|
||||
from djc_core_html_parser import set_html_attributes
|
||||
|
||||
from django_components.node import BaseNode
|
||||
from django_components.util.html_parser import set_html_attributes
|
||||
from django_components.util.misc import get_import_path, is_nonempty_str
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -438,9 +438,9 @@ SCRIPT_NAME_REGEX = re.compile(
|
|||
rb"^(?P<comp_cls_hash>[\w\-\./]+?),(?P<id>[\w]+?),(?P<js>[0-9a-f]*?),(?P<css>[0-9a-f]*?)$"
|
||||
)
|
||||
# E.g. `data-djc-id-a1b2c3`
|
||||
MAYBE_COMP_ID = r"(?: data-djc-id-\w{6})?"
|
||||
MAYBE_COMP_ID = r'(?: data-djc-id-\w{6}="")?'
|
||||
# E.g. `data-djc-css-99914b`
|
||||
MAYBE_COMP_CSS_ID = r"(?: data-djc-css-\w{6})?"
|
||||
MAYBE_COMP_CSS_ID = r'(?: data-djc-css-\w{6}="")?'
|
||||
|
||||
PLACEHOLDER_REGEX = re.compile(
|
||||
r"{css_placeholder}|{js_placeholder}".format(
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue