For a language like C, I would describe the formatting process as "straightforward" as opposed to "trivial". It's straightforward in that it feels very mechanical, but not trivial in the sense that it's difficult to fully automate the process. (The mechanical part is inserting spaces at the right places, the not so mechanical part is swapping tokens and rewriting expressions so that things line up).
You can see an example recording here of how it's done:
Considering the language, C and the size of the file, I would not argue it is not trivial. The key feature of donut.c is how small the file actually is.
For something larger or in other languages, or having text strings, certainly not trivial.