![忽略双空格对齐纯文本](https://linux22.com/image/1546860/%E5%BF%BD%E7%95%A5%E5%8F%8C%E7%A9%BA%E6%A0%BC%E5%AF%B9%E9%BD%90%E7%BA%AF%E6%96%87%E6%9C%AC.png)
我想调整一个纯文本文件(实际上是一个 markdown 文件),其中一些行以双倍空格结尾:
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.
上面的一些行以双空格结尾,这应该在 markdown 中表示新行。我想要一个命令行命令(或 bash 脚本?)来证明这一点,例如当使用时,par
命令par j1w50 < misc.markdown > misc_new.markdown
的输出是
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.
不保留 markdown 格式:
我被这个解决方案的简单性所吸引par
,所以想避免自己创建任何大脚本。
以下问题类似/相关,但并不特定于 Markdown 语言的双倍空格问题:-Par:对齐文本而不连接线 -如何在 Linux 中对齐纯文本?