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

[Docs] Fix badly indented lists and blocks #11660

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

cameel
Copy link
Member

@cameel cameel commented Jul 14, 2021

We had a bunch of badly indented stuff in the docs that did not quite break the syntax but still got rendered weirdly.

To render a list to properly in .rst:

  • There must be an empty line between a list and the text preceding it. Without it the preceding line is for some reason displayed in bold.
  • There must be no indentation for top-level items (we had them sometimes indented with a single space).
  • Nested items should be indented just enough to match the width of the bullet (so 2 spaces for simple - x but e.g. 4 for something like 12. x).

The PR also fixes inconsistent indents for code blocks in a few places where I've spotted them while fixing lists. Looks like Sphinx does not enforce any particular indent width here but some of our scripts (e.g. isolate_tests.py) expect 4 and won't detect code blocks with a smaller indent. There were also some blocks indented with a mix of tabs and spaces.

When reviewing it I recommend taking a look in the mode that ignores whitespace. In that mode the diff should be nearly empty except for newlines (these do not get ignored) and some changed bullet points. There's also one change that adjusts a header.

@cameel cameel requested a review from chriseth July 14, 2021 17:56
@cameel cameel self-assigned this Jul 14, 2021
@cameel cameel requested review from axic and removed request for chriseth July 14, 2021 17:57
@cameel cameel force-pushed the docs-fix-badly-indented-lists-and-blocks branch from f8150c1 to 76bbd45 Compare July 14, 2021 18:24
@cameel cameel force-pushed the docs-fix-badly-indented-lists-and-blocks branch from 76bbd45 to b513ca1 Compare July 15, 2021 08:14
@cameel cameel merged commit 6d6c9e6 into develop Jul 21, 2021
@cameel cameel deleted the docs-fix-badly-indented-lists-and-blocks branch July 21, 2021 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants