RemiFabre commited on
Commit
c991519
·
1 Parent(s): 1d202d3

Fixed regex to allow for subdirectories in the promp library

Browse files
src/reachy_mini_conversation_app/prompts.py CHANGED
@@ -25,7 +25,9 @@ def _expand_prompt_includes(content: str) -> str:
25
 
26
  """
27
  # Pattern to match [<name>] where name is a valid file stem (alphanumeric, underscores, hyphens)
28
- pattern = re.compile(r'^\[([a-zA-Z0-9_-]+)\]$')
 
 
29
 
30
  lines = content.split('\n')
31
  expanded_lines = []
 
25
 
26
  """
27
  # Pattern to match [<name>] where name is a valid file stem (alphanumeric, underscores, hyphens)
28
+ # pattern = re.compile(r'^\[([a-zA-Z0-9_-]+)\]$')
29
+ # Allow slashes for subdirectories
30
+ pattern = re.compile(r'^\[([a-zA-Z0-9/_-]+)\]$')
31
 
32
  lines = content.split('\n')
33
  expanded_lines = []