python-fragments 0.14__tar.gz → 0.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_fragments-0.14 → python_fragments-0.16}/PKG-INFO +1 -1
- {python_fragments-0.14 → python_fragments-0.16}/fragments/grammar.py +3 -3
- {python_fragments-0.14 → python_fragments-0.16}/pyproject.toml +1 -1
- {python_fragments-0.14 → python_fragments-0.16}/python_fragments.egg-info/PKG-INFO +1 -1
- {python_fragments-0.14 → python_fragments-0.16}/README.md +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/__init__.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/ast_nodes.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/cli.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/html/__init__.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/html/elements.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/loader.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/__init__.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/based_proxy.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/__init__.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/code_actions.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/completion.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/definition.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/diagnostics.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/document_highlight.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/document_symbols.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/folding_range.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/hover.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/inlay_hints.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/lifecycle.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/references.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/rename.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/semantic_tokens.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/signature_help.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/file_state.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/message_queue.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/pyright_notification_handlers/__init__.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/pyright_notification_handlers/capability.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/pyright_notification_handlers/configuration.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/pyright_notification_handlers/diagnostics.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/types.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/source.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/fragments/transpiler.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/python_fragments.egg-info/SOURCES.txt +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/python_fragments.egg-info/dependency_links.txt +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/python_fragments.egg-info/entry_points.txt +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/python_fragments.egg-info/requires.txt +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/python_fragments.egg-info/top_level.txt +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/setup.cfg +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/tests/test_grammar.py +0 -0
- {python_fragments-0.14 → python_fragments-0.16}/tests/test_source_map.py +0 -0
|
@@ -17,8 +17,8 @@ from fragments.ast_nodes import (
|
|
|
17
17
|
)
|
|
18
18
|
from fragments.source import Source
|
|
19
19
|
|
|
20
|
-
IDENTIFIER = r"[a-zA-Z_][a-zA-Z0-9_]*"
|
|
21
20
|
HTML_IDENTIFIER = r"[a-zA-Z][a-zA-Z0-9_:.-]*"
|
|
21
|
+
HTML_ATTRIBUTE_NAME = r"[a-zA-Z:-_][a-zA-Z0-9_:.-]*"
|
|
22
22
|
HTML_TEXT = r"(.*?)(?=<|{{)"
|
|
23
23
|
|
|
24
24
|
|
|
@@ -202,7 +202,7 @@ def expect_html_element(source: Source) -> tuple[Source, ASTHTMLElement | ASTCon
|
|
|
202
202
|
attributes: dict[str, ASTHTMLAttribute] = {}
|
|
203
203
|
while not (source.remaining().startswith(">") or source.remaining().startswith("/>")):
|
|
204
204
|
attribute_source_start = source.offset
|
|
205
|
-
source, attribute_name = expect_regex(source,
|
|
205
|
+
source, attribute_name = expect_regex(source, HTML_ATTRIBUTE_NAME, "attribute name")
|
|
206
206
|
if not source.remaining().startswith("="):
|
|
207
207
|
attribute = ASTHTMLAttribute(attribute_source_start, source.offset, attribute_name, None, None)
|
|
208
208
|
attributes[attribute_name] = attribute
|
|
@@ -238,7 +238,7 @@ def expect_html_element(source: Source) -> tuple[Source, ASTHTMLElement | ASTCon
|
|
|
238
238
|
source, children = expect_children(source)
|
|
239
239
|
source = expect_string(source, "</")
|
|
240
240
|
source, _ = source.eat_whitespace()
|
|
241
|
-
source, closing_name = expect_regex(source,
|
|
241
|
+
source, closing_name = expect_regex(source, HTML_IDENTIFIER, "element name")
|
|
242
242
|
|
|
243
243
|
if name != closing_name:
|
|
244
244
|
raise ParsingError(f"Element closed ({closing_name!r}) is not the same as currently opened element ({name!r})", source.offset)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-fragments"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.16"
|
|
8
8
|
description = "Modern HTML template rendering in Python"
|
|
9
9
|
authors = [{ name = "The Running Algorithm", email = "services@therunningalgorithm.info" }]
|
|
10
10
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/completion.py
RENAMED
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/definition.py
RENAMED
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/diagnostics.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/hover.py
RENAMED
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/inlay_hints.py
RENAMED
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/lifecycle.py
RENAMED
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/references.py
RENAMED
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/fragments/lsp/client_message_handlers/rename.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fragments-0.14 → python_fragments-0.16}/python_fragments.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|