fix: error in find_macros when the input is empty
Added a special case to handle this issue.
This commit is contained in:
@@ -36,6 +36,8 @@ def find_macros(text):
|
||||
('Exercise', 'four-circles')
|
||||
]
|
||||
"""
|
||||
if not text:
|
||||
return []
|
||||
macros = re.findall(MACRO_RE, text)
|
||||
# remove the quotes around the argument
|
||||
return [(name, _remove_quotes(arg)) for name, arg in macros]
|
||||
|
||||
Reference in New Issue
Block a user