This commit is contained in:
James Maslek
2023-08-21 16:55:58 -04:00
2 changed files with 2 additions and 1 deletions

View File

@@ -246,7 +246,7 @@ def parse_openbb_script(
foreach_loop_found = True
# Regular expression pattern to match variables starting with $
pattern = r"(?<!\$)(\$(\w+)(\[[^]]*\])?)(?![^\[]*\])"
pattern = r"(?<!\$)(\$(\w+)(\[[^\]]*\])?)(?=(?:[^\]]*\]*))"
# Find all matches of the pattern in the line
matches: Optional[List[Match[str]]] = re.findall(pattern, line)

View File

@@ -632,6 +632,7 @@ class TerminalController(BaseController):
)
parser.add_argument(
"--file",
"-f",
help="The path or .openbb file to run.",
dest="file",
required="-h" not in other_args