Skip to content

Commit

Permalink
resolve UnboundLocalError
Browse files Browse the repository at this point in the history
- updated variable name in `parse_markdown` function
  • Loading branch information
urvishp80 authored Aug 1, 2024
1 parent b206b67 commit 2d3783b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
def parse_markdown(text):
"""Parses a markdown text to extract YAML front matter and the document body"""
# Remove content between {% %}
content = re.sub(r'{%.*%}', '', content, flags=re.MULTILINE)
text = re.sub(r'{%.*%}', '', text, flags=re.MULTILINE)
# Define a regular expression pattern to match the front matter between `---\n` delimiters
pattern = re.compile(r'^---\s*$(.*?)^---\s*$', re.DOTALL | re.MULTILINE)
match = pattern.search(text)
Expand Down

0 comments on commit 2d3783b

Please sign in to comment.