Userland: Treat all text/* MIME types as text when pasting
It's a bit weird to get a newline after plain text but not after, say, a URL list.
This commit is contained in:
parent
66c6e0035e
commit
e12388c349
Notes:
sideshowbarker
2024-07-19 05:56:56 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/e12388c3495 Pull-request: https://github.com/SerenityOS/serenity/pull/2445 Issue: https://github.com/SerenityOS/serenity/issues/91 Reviewed-by: https://github.com/alimpfard
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ int main(int argc, char* argv[])
|
|||
printf("%s", data_and_type.data.characters());
|
||||
// Append a newline to text contents, but
|
||||
// only if we're not asked not to do this.
|
||||
if (data_and_type.type == "text/plain" && !no_newline)
|
||||
if (data_and_type.type.starts_with("text/") && !no_newline)
|
||||
putchar('\n');
|
||||
} else {
|
||||
printf("%s\n", data_and_type.type.characters());
|
||||
|
|
Loading…
Add table
Reference in a new issue