fix: lowercase filepath bad case (#1259)

This commit is contained in:
yetone 2025-02-12 22:59:15 +08:00 committed by GitHub
parent f8636315a5
commit 9bad591e8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -227,6 +227,14 @@ local function transform_result_content(selected_files, result_content, prev_fil
goto continue
end
end
if line_content:match("<filepath>.+</filepath>") then
local filepath = line_content:match("<filepath>(.+)</filepath>")
if filepath then
current_filepath = filepath
table.insert(transformed_lines, string.format("Filepath: %s", filepath))
goto continue
end
end
if line_content:match("^%s*<SEARCH>") then
is_searching = true
@ -243,6 +251,7 @@ local function transform_result_content(selected_files, result_content, prev_fil
and prev_filepath
and not prev_line:match("Filepath:.+")
and not prev_line:match("<FILEPATH>.+</FILEPATH>")
and not prev_line:match("<filepath>.+</filepath>")
then
table.insert(transformed_lines, string.format("Filepath: %s", prev_filepath))
end