alt-v: view source of email

This commit is contained in:
2026-03-11 23:16:19 +01:00
parent f703bc487a
commit 7653f052b7
3 changed files with 11 additions and 8 deletions

View File

@@ -16,11 +16,11 @@ BEGIN {
/^header{/ {
header = $0
}
/^part}/ {
/^(part|attachment)}/ {
level--
}
/^part{/ {
parts = sprintf("%s\n%"(2*level)"s%s", parts, "", substr($1, 7))
/^(part|attachment){/ {
parts = sprintf("%s\n%"(2*level)"s%s", parts, "", substr($1, index($1, "ID")))
level++
}
# /^part{ ID: [[:digit:]]+, Content-type: multipart\/alternative/ {