I would like to justify a plain text file (actually a markdown file) where some lines end in a double space:
some lines which
can be justified with a little care
and attention.
The following tough should not
be changed as this line ends in a double space:
some new line
I would also like to have some itemised list:
* The above line also ends in a double space.
However, this line ends in a single space.
* A new bullet.
- Some sub item.
Some of the above lines end in a double space, which should indicate in markdown a new line. I would like a command line command (or bash script?) to justify this,
such as when using par for example, par j1w50 < misc.markdown > misc_new.markdown, where the output of the command is
some lines which can be justified with a little
care and attention.
The following tough should not be changed as this
line ends in a double space: some new line
I would also like to have some itemised list: *
The above line also ends in a double space.
However, this line ends in a single space. * A new
bullet. - Some sub item.
which does not preserve the markdown formatting:
I was attracted to the par solution because of its simplicity, so would like to avoid creating any big scripts myself.
The following Qs are similar/related, but aren't specific to the double space issue for markdown languages: - Par: justify text without joining lines - How can I justify plain text in Linux?

