-
Notifications
You must be signed in to change notification settings - Fork 18
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
Produce clear guidelines about indentation #9
Comments
Maybe a solution would be to make editors use "contextual indentation" (2 spaces in general case, 3 within toctree context, 2 then 4 within Python code-blocks, 2 then 2 within Drupal code-blocks, 2 then TAB within Makefile code-blocks...). |
4 spaces indentation is not a solution for all cases... As examples: Bullet lists use 2 spaces indentation:
* a first list item.
* a list item which
is two lines long.
Numbered lists use 3 spaces indentation:
1. something
which is long.
2. another thing. I guess it is a feature to improve readability... |
Original RST indentation rules are here : http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#indentation |
See also PEP 12, which tells 4 spaces-indentation for literal blocks. |
I don't agree with what you said... Numbered lists can use 4 spaces indentation, even five !
If Python has 4 indent so is rST... Isn't? |
Issues with 2 spaces:
As an example
toctree
directive doesn't work with 2 spaces but seems to work with 3 or 4 spaces.As an example:
Python convention is to use 4 spaces. Since most Sphinx projects are about Python projects, Python code-blocks are a really common use case. So 4 space indentation may be useful for many users (most of them?).
Another common use case for code-blocks is sh or bash... 4 spaces doesn't hurt in that case.
The text was updated successfully, but these errors were encountered: