How to reformat reStructuredText?
Posted
by
wal-o-mat
on Super User
See other posts from Super User
or by wal-o-mat
Published on 2012-12-17T07:52:27Z
Indexed on
2012/12/17
11:05 UTC
Read the original article
Hit count: 211
vim
|restructuredtext
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?
© Super User or respective owner