Merge branch 'main' into bytes-to-md
This commit is contained in:
commit
548273543a
2 changed files with 5 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ class RtfConverter(DocumentConverter):
|
|||
"""
|
||||
|
||||
def convert(self, local_path, **kwargs) -> Union[None, DocumentConverterResult]:
|
||||
# Bail if not a DOCX
|
||||
# Bail if not a RTF
|
||||
extension = kwargs.get("file_extension", "")
|
||||
if extension.lower() != ".rtf":
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue