like others said, in Markdown, you add an empty new line between two paragraphs.
I will take the chance to shill zift (a fork of the zig formatter), but note it retains the trimming lines end thing. If you’d like to add a config for it yourself (and send a patch for it) you can use that.