Skip to content

Commit

Permalink
fix for default prop in comment regex (reflex-dev#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosabadia authored Oct 9, 2024
1 parent 03a83a4 commit 24fe8fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pcweb/pages/docs/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
}

}


Expand Down

0 comments on commit 24fe8fd

Please sign in to comment.