Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to reformat text? #51

Open
ntolia opened this issue Jun 26, 2017 · 2 comments
Open

Ability to reformat text? #51

ntolia opened this issue Jun 26, 2017 · 2 comments
Labels
up for grab Pull requests are welcome.

Comments

@ntolia
Copy link

ntolia commented Jun 26, 2017

I just might be missing something obvious but is there a way to reformat text to wrap it to some appropriate length? I currently have to do that manually as our build system uses doc8 to lint and has line length restrictions enabled.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@lextm
Copy link
Member

lextm commented Jun 26, 2017

No linter or formatter yet.

@lextm lextm added the up for grab Pull requests are welcome. label Jun 26, 2017
@lextm lextm added dependency issue up for grab Pull requests are welcome. and removed up for grab Pull requests are welcome. dependency issue labels Mar 16, 2018
@acsr
Copy link

acsr commented Aug 30, 2018

Important note on line length linters: Limiting line length in prose text and documentation is not a smart idea. If you are just writing plain docs by hand (for Sphinx!) simply ignore these limits and switch your editor to word wrap instead.

It is much better to write one sentence or semantic block per line.

If your documentation or string is inline in your code and exceeds the limits this is a challenge for static code analysers. Here you get the arguments why it is worth to ignore PEP8 here.

If you change prose over time rearranging word wrap in human readable text to match e.g. PEP8 80 chars per line can and will lead to unreadable diffs. and clunky source code.

Another point is that gnu gettext based translation of docs (which you can use excellently with sphinx-intl) leads to cleaner message ids and reuse of standard phrases. It makes the life of translators much easier.

Creating exceptions to make linters ignore i18n message ids ist not the topic of this comment.

Read the excellent article of Brandon Rhodes on Semantic Line Feeds http://rhodesmill.org/brandon/2012/one-sentence-per-line/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
up for grab Pull requests are welcome.
Projects
None yet
Development

No branches or pull requests

3 participants