-
Notifications
You must be signed in to change notification settings - Fork 2k
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
code-block: Fix handling of :dedent: and add unit tests #9661
Merged
Commits on Sep 21, 2021
-
Configuration menu - View commit details
-
Copy full SHA for cf9b5b5 - Browse repository at this point
Copy the full SHA cf9b5b5View commit details -
code-block: Handle
0
as numeric argument in :dedent:Due to how Python converts ints to bool the numeric argument ``0`` to the :dedent: option of the code-block directive was handled like if no argument was given to :dedent:. Check properly for None in the options argument processing, so ``0`` is treated as numeric argument to :dedent:. Bug: sphinx-doc#9636
Configuration menu - View commit details
-
Copy full SHA for 3b46553 - Browse repository at this point
Copy the full SHA 3b46553View commit details -
Fix: 9636: code-block: Do not remove newlines with :dedent:
If the option :dedent: (without numeric argument) was given to code-block then all newlines where striped from the resulting code. Preserve newlines when stripping common whitespace at the beginning of code blocks.
Configuration menu - View commit details
-
Copy full SHA for 3b9ecf9 - Browse repository at this point
Copy the full SHA 3b9ecf9View commit details
Commits on Sep 23, 2021
-
The presence or absence of the ``:dedent: 4`` option in the example .. code-block:: ruby :dedent: 4 some ruby code makes no difference for the output due to how ReST handles whitespace. If it is present, then ReST indent is 3 and the 4 spaces of the code are stripped by the :dedent: option. If the dedent option is missing, then the ReST indent is 7 and all whitespace is stripped again. Add a dummy option to fixate the ReST indent to 3, so adding and removing of the option in the example has an effect on the output.
Configuration menu - View commit details
-
Copy full SHA for 54b1991 - Browse repository at this point
Copy the full SHA 54b1991View commit details
Commits on Jan 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 6611140 - Browse repository at this point
Copy the full SHA 6611140View commit details -
doc: Remove a mention to :dedent: 0
`:dedent: 0` option for the code-block directive is a secret feature. So it should not be mentioned in our docs.
Configuration menu - View commit details
-
Copy full SHA for 44e6d0c - Browse repository at this point
Copy the full SHA 44e6d0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e2f1416 - Browse repository at this point
Copy the full SHA e2f1416View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff54f97 - Browse repository at this point
Copy the full SHA ff54f97View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.