support html

This commit is contained in:
rong-xyz 2025-04-23 06:43:37 +00:00
parent bc67a318a1
commit 71e55ba93e

View file

@ -61,6 +61,8 @@ class MarkItUp:
return DocxConverter(config=self.config).convert(stream, stream_info), stream_info return DocxConverter(config=self.config).convert(stream, stream_info), stream_info
case "image": case "image":
return ImageConverter(config=self.config).convert(stream, stream_info), stream_info return ImageConverter(config=self.config).convert(stream, stream_info), stream_info
case "html":
return HtmlConverter(config=self.config).convert(stream, stream_info), stream_info
case _: case _:
match stream_info.category: match stream_info.category:
case "ppt": case "ppt":
@ -117,6 +119,8 @@ class MarkItUp:
elif magic_type.startswith("text/"): elif magic_type.startswith("text/"):
if magic_type == "text/csv": if magic_type == "text/csv":
category = "csv" category = "csv"
elif magic_type == "text/html":
category = "html"
else: else:
category = "text" category = "text"
else: else: