How to reformat reStructuredText?
- by wal-o-mat
I'm writing reST in vim, which handles line breaks for me (after 80 chars). However, since I frequently go back and edit the text before, lines get ugly again. For example, in tables, it's sometimes annoying to re-format a complete table just because you need a line break in some place.
So I wish I had a program that reads my ugly-but-correct reStructuredText and outputs it nicely formatted and wrapped.
I found that pandoc in.rst -w rst mostly works, but it has some drawbacks. For example
:author: John Doe
becomes
author
John Doe
and title formatting is changed as well. Sadly, there seems to be no rst2rst or something similar. Does anyone have some advice?