Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: 修复旧word文档图片无法正常识别 #1533 #1559

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

shaohuzhang1
Copy link
Contributor

fix: 修复旧word文档图片无法正常识别 #1533

Copy link

f2c-ci-robot bot commented Nov 6, 2024

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

f2c-ci-robot bot commented Nov 6, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

try:
_images = paragraph_element.xpath(images_xpath)
if _images is not None and len(_images) > 0:
for image in _images:
images.append(image)
images.append({'image': image, 'get_image_id_handle': get_image_id_handle})
except Exception as e:
pass
return images

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码的主要内容是在一个名为 image_to_mode 的函数中处理 Word 图片(包含 Blip 图和图片数据)。以下是针对当前日期的修订说明:

  1. 将所有导入语句都放在开头。
  2. 提供了错误的文档分隔器基类的注释,并修正为更准确的功能描述。

整体而言,这个修改主要是为了改进代码可读性,并确保其语法和风格符合良好实践要求。在进行实际测试之前,请确保你已经更新到最新的代码库版本和其他开发工具。如有任何问题或需要进一步的帮助,请随时联系我!

@shaohuzhang1 shaohuzhang1 merged commit 22d9fdc into main Nov 6, 2024
4 of 5 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@main@fix_docx_parse branch November 6, 2024 06:20
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants