Skip to content

zombiezen/mdunwrap

Repository files navigation

mdunwrap: Markdown Unwrapper

mdunwrap is a simple command-line tool for removing soft line breaks from Markdown. This is helpful if you're copying Markdown from a text file into a web form that renders soft line breaks as hard line breaks.

For example, it takes Markdown that looks like this:

Hello,
World!
This is a single paragraph\
with some breaks.

into this:

Hello, World! This is a single paragraph\
with some breaks.

Getting Started

mdunwrap is canonically built using Nix. After installing Nix with Flakes support, you can try out mdunwrap with:

nix run github:zombiezen/mdunwrap -- myfile.md

Or if you want to install it in your PATH:

nix profile install github:zombiezen/mdunwrap &&
mdunwrap myfile.md

Caveats

  • mdunwrap attempts to stay true to the original Markdown source, but may make modifications that don't change the rendered output.
  • mdunwrap does not support tables.

License

Apache 2.0