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:
Sergey Bugaev 2020-05-30 14:35:18 +03:00 committed by Andreas Kling
parent 66c6e0035e
commit e12388c349

View file

@ -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());