From 3d1efb706924112daed986a4eef634e408bad65e Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sat, 21 Jun 2025 17:59:55 +0800 Subject: [PATCH] fix: replace `\r` with empty string, fixes #129 --- piper.yazi/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piper.yazi/main.lua b/piper.yazi/main.lua index 127e7fa..aef08eb 100644 --- a/piper.yazi/main.lua +++ b/piper.yazi/main.lua @@ -48,7 +48,7 @@ function M:seek(job) require("code"):seek(job) end function M.format(job, lines) local format = job.args.format if format ~= "url" then - local s = table.concat(lines, ""):gsub("\t", string.rep(" ", rt.preview.tab_size)) + local s = table.concat(lines, ""):gsub("\r", ""):gsub("\t", string.rep(" ", rt.preview.tab_size)) return ui.Text.parse(s):area(job.area) end