diff --git a/packages/markitdown/src/markitdown/converters/_markdownify.py b/packages/markitdown/src/markitdown/converters/_markdownify.py index 5b6d739..e15f607 100644 --- a/packages/markitdown/src/markitdown/converters/_markdownify.py +++ b/packages/markitdown/src/markitdown/converters/_markdownify.py @@ -33,6 +33,10 @@ def convert_a(self, el: Any, text: str, convert_as_inline: bool): prefix, suffix, text = markdownify.chomp(text) # type: ignore if not text: return "" + + if el.find_parent("pre") is not None: + return text + href = el.get("href") title = el.get("title")