Don't generate md links in 'pre' blocks

This commit is contained in:
Tomasz Kalinowski 2025-02-11 05:39:12 -05:00
parent 4b62506451
commit 025812d31c

View file

@ -33,6 +33,10 @@ class _CustomMarkdownify(markdownify.MarkdownConverter):
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")