Don't generate md links in 'pre' blocks (#322)
This commit is contained in:
committed by
GitHub
parent
4b62506451
commit
3a5ca22a8d
@@ -33,6 +33,10 @@ class _CustomMarkdownify(markdownify.MarkdownConverter):
|
|||||||
prefix, suffix, text = markdownify.chomp(text) # type: ignore
|
prefix, suffix, text = markdownify.chomp(text) # type: ignore
|
||||||
if not text:
|
if not text:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
if el.find_parent("pre") is not None:
|
||||||
|
return text
|
||||||
|
|
||||||
href = el.get("href")
|
href = el.get("href")
|
||||||
title = el.get("title")
|
title = el.get("title")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user