Skip to content

Commit 127e6a3

Browse files
committed
new expression can be marked by "}"
also removes extra print statements makes docs run in debug mode (would have caught this bug that way)
1 parent cd56db9 commit 127e6a3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def docs(session: Session) -> None:
7676
"html",
7777
"docs/source",
7878
"docs/build",
79-
env={"PYTHONPATH": os.getcwd()},
79+
env={"PYTHONPATH": os.getcwd(), "IDOM_DEBUG_MODE": "1"},
8080
)
8181

8282

src/idom/web/utils.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ def resolve_module_exports_from_source(
8989
# Exporting functions and classes
9090
names.update(_JS_FUNC_OR_CLS_EXPORT_PATTERN.findall(content))
9191

92-
print(content)
9392
for export in _JS_GENERAL_EXPORT_PATTERN.findall(content):
94-
print(export)
9593
export = export.rstrip(";").strip()
9694
# Exporting individual features
9795
if export.startswith("let "):
@@ -155,5 +153,5 @@ def _resolve_relative_url(base_url: str, rel_url: str) -> str:
155153
r";?\s*export\s+(?:function|class)\s+([a-zA-Z_$][0-9a-zA-Z_$]*)"
156154
)
157155
_JS_GENERAL_EXPORT_PATTERN = re.compile(
158-
r"(?:^|;)\s*export(?=\s+|{)(.*?)(?=;|$)", re.MULTILINE
156+
r"(?:^|;|})\s*export(?=\s+|{)(.*?)(?=;|$)", re.MULTILINE
159157
)

0 commit comments

Comments
 (0)