测试问题修改

This commit is contained in:
chengxl
2025-11-27 13:42:15 +08:00
parent b904a0d3df
commit 632fede3cb

View File

@@ -776,13 +776,13 @@ class ArticleParserService
}
//处理超链接(优先提取链接目标,可能是邮箱)
// if ($element instanceof \PhpOffice\PhpWord\Element\Link) {
// $target = $element->getTarget();
// if (strpos($target, 'mailto:') === 0) {
// $text .= str_replace('mailto:', '', $target) . ' '; // 剥离mailto:前缀
// }
// $text .= $element->getText() . ' ';
// }
if ($element instanceof \PhpOffice\PhpWord\Element\Link) {
$target = $element->getTarget();
if (strpos($target, 'mailto:') === 0) {
$text .= str_replace('mailto:', '', $target) . ' '; // 剥离mailto:前缀
}
$text .= $element->getText() . ' ';
}
//处理字段和注释(可能包含隐藏邮箱)
if ($element instanceof \PhpOffice\PhpWord\Element\Field) {