From 24fe8fd603e61f37cc1463f4f08911b26322883a Mon Sep 17 00:00:00 2001 From: Carlos <36110765+carlosabadia@users.noreply.github.com> Date: Wed, 9 Oct 2024 04:48:33 +0200 Subject: [PATCH] fix for default prop in comment regex (#1010) --- pcweb/pages/docs/component.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcweb/pages/docs/component.py b/pcweb/pages/docs/component.py index f886c1a226..5d40257f4e 100644 --- a/pcweb/pages/docs/component.py +++ b/pcweb/pages/docs/component.py @@ -70,9 +70,9 @@ def get_default_value(lines: list[str], start_index: int) -> str: if start_index > 0: comment_line = lines[start_index - 1].strip() if comment_line.startswith("#"): - default_match = re.search(r'Default:\s*(["\']?\w+["\']?|\w+)', comment_line) + default_match = re.search(r"Default:\s*(.+)$", comment_line) if default_match: - default_value = default_match.group(1) + default_value = default_match.group(1).strip() return default_value # Get the initial line @@ -832,7 +832,7 @@ def prop_docs( "is_server_side_group": { "description": "The is_server_side_group event handler is called to check if the group is server-side." } - + }