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

Dedent text to make code blocks copyable #647

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Sep 29, 2023

Miss Islington comments on PRs like this:


Sorry, @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 14cdefa667f211401c9dfab33c4695e80b4e5e95 3.11


As plaintext:

Sorry, @hugovk, I could not cleanly backport this to `3.11` due to a conflict. 
                                Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.
                                ```
                                cherry_picker 14cdefa667f211401c9dfab33c4695e80b4e5e95 3.11
                                ```
                                

If we dedent it:


Sorry, @hugovk, I could not cleanly backport this to `3.11` due to a conflict. 
Please backport using [cherry_picker](https://pypi.org/project/cherry-picker/) on command line.
```
cherry_picker 14cdefa667f211401c9dfab33c4695e80b4e5e95 3.11
```

Then it renders more nicely:


Sorry, @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 14cdefa667f211401c9dfab33c4695e80b4e5e95 3.11

And note the little copy button on the right which makes it easy to copy the command for pasting into the terminal:

image
image

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #647 (42edb8b) into main (9d293cb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #647   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          356       356           
  Branches        29        29           
=========================================
  Hits           356       356           
Flag Coverage Δ
Python_3.10 100.00% <100.00%> (ø)
Python_3.11 100.00% <100.00%> (ø)
Python_3.9 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
miss_islington/util.py 100.00% <100.00%> (ø)

@Mariatta Mariatta merged commit f4f67dd into python:main Sep 29, 2023
@hugovk hugovk deleted the dedent branch September 29, 2023 16:31
@hugovk
Copy link
Member Author

hugovk commented Sep 29, 2023

It's working! 🎉

image

python/cpython#109810 (comment)

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.

3 participants