Skip to content

Commit

Permalink
Fixed issue #17397 by updating the markdown format in MarkdownReader (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhimaan-Senapati authored Jan 10, 2025
1 parent 652e37a commit 992ef61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def markdown_to_tups(self, markdown_text: str) -> List[Tuple[Optional[str], str]
]

def remove_images(self, content: str) -> str:
"""Remove images in markdown content."""
pattern = r"!{1}\[\[(.*)\]\]"
return re.sub(pattern, "", content)
"""Remove images in markdown content but keep the description."""
pattern = r"![(.?)](.?)"
return re.sub(pattern, r"\1", content)

def remove_hyperlinks(self, content: str) -> str:
"""Remove hyperlinks in markdown content."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ license = "MIT"
maintainers = ["FarisHijazi", "Haowjy", "ephe-meral", "hursh-desai", "iamarunbrahma", "jon-chuang", "mmaatouk", "ravi03071991", "sangwongenip", "thejessezhang"]
name = "llama-index-readers-file"
readme = "README.md"
version = "0.4.2"
version = "0.4.3"

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
Expand Down

0 comments on commit 992ef61

Please sign in to comment.