Skip to content

Commit 3661853

Browse files
authored
fix: initialize md_text in _parse_rss_type to prevent UnboundLocalError (#2164)
1 parent ee6fe25 commit 3661853

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/markitdown/src/markitdown/converters/_rss_converter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,9 @@ def _parse_rss_type(
186186
channel_title = self._get_data_by_tag_name(channel, "title")
187187
channel_description = self._get_data_by_tag_name(channel, "description")
188188
items = channel.getElementsByTagName("item")
189+
md_text = ""
189190
if channel_title:
190-
md_text = f"# {channel_title}\n"
191+
md_text += f"# {channel_title}\n"
191192
if channel_description:
192193
md_text += f"{channel_description}\n"
193194
for item in items:

0 commit comments

Comments
 (0)