Don't generate md links in 'pre' blocks (#322)

This commit is contained in:
Tomasz Kalinowski
2025-02-11 10:13:17 -05:00
committed by GitHub
parent 4b62506451
commit 3a5ca22a8d

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")