-
Notifications
You must be signed in to change notification settings - Fork 309
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
need to hide numbers of code line when copy pasting example from site web #896
Comments
There is a copy button in the upper right.
…On Mon, Jun 7, 2021, 2:23 PM pyweeker ***@***.***> wrote:
Hello,
from this example page:
https://arcade.academy/examples/sprite_collect_rotating.html#sprite-collect-rotating
if you want to copy and paste examples from site web, you get this:
1"""
2Sprite Collect Rotating Coins
3
4Simple program to show basic sprite usage.
5
6Artwork from http://kenney.nl
7
8If Python and Arcade are installed, this example can be run from the command line with:
9python -m arcade.examples.sprite_collect_rotating
10"""
11
12import random
13import arcade
14import os
15
16# --- Constants ---
17SPRITE_SCALING_PLAYER = 0.5
18SPRITE_SCALING_COIN = 0.2
19COIN_COUNT = 50
20
21SCREEN_WIDTH = 800
22SCREEN_HEIGHT = 600
23SCREEN_TITLE = "Sprite Collect Rotating Coins Example"
24
25
26class Coin(arcade.Sprite):
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#896>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALFGTB6276W2AIOUUXLCS3TRUMBVANCNFSM46IKEPUQ>
.
|
@pvcraven yes, clicking that also keeps the line numbers when it shouldn't edit: and i believe it is for everything |
hello, check it, the bug is still there
Le lun. 7 juin 2021 à 22:50, Paul V Craven ***@***.***> a
écrit :
… There is a copy button in the upper right.
On Mon, Jun 7, 2021, 2:23 PM pyweeker ***@***.***> wrote:
> Hello,
> from this example page:
>
>
https://arcade.academy/examples/sprite_collect_rotating.html#sprite-collect-rotating
>
> if you want to copy and paste examples from site web, you get this:
>
> 1"""
> 2Sprite Collect Rotating Coins
> 3
> 4Simple program to show basic sprite usage.
> 5
> 6Artwork from http://kenney.nl
> 7
> 8If Python and Arcade are installed, this example can be run from the
command line with:
> 9python -m arcade.examples.sprite_collect_rotating
> 10"""
> 11
> 12import random
> 13import arcade
> 14import os
> 15
> 16# --- Constants ---
> 17SPRITE_SCALING_PLAYER = 0.5
> 18SPRITE_SCALING_COIN = 0.2
> 19COIN_COUNT = 50
> 20
> 21SCREEN_WIDTH = 800
> 22SCREEN_HEIGHT = 600
> 23SCREEN_TITLE = "Sprite Collect Rotating Coins Example"
> 24
> 25
> 26class Coin(arcade.Sprite):
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#896>, or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AALFGTB6276W2AIOUUXLCS3TRUMBVANCNFSM46IKEPUQ
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#896 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATQR4N6XMERKJSOIBGFAZ3TTRUWI7ANCNFSM46IKEPUQ>
.
|
Yes, the line number are included with copy button as well. I studied this code, the copy button targets the whole cell which contains code, I think it will be difficult to fix this to separate line numbers from the file contents here. However, I did find option to remove the line numbers using regex in Sphinx copy button configuration (it is tested and working). Let me know if you want me to raise the pull request. Otherwise we can remove the line numbers as I didn't find any references to them in the associated text. |
This is odd. Seems starting with Sphinx 4.0.0 this is how it works. Sphinx 3.5.7 still copies w/o line numbers. I couldn't find a bug report, yet feel like there HAS to be one out there for it. I listed it as: Unfortunately, 4.0.0 also required us to update the css, and building with 3.5.7 means we'll need to go back css versions I think. |
We should stick to Sphinx 3.x for now I think. 4.x do add a lot of issues, |
See: I reverted to 3.5.4 and uploaded fixed files. We'll keep with 3.5.4 for a while. The cloud should update withing 24 hours. |
Hello,
from this example page:
https://arcade.academy/examples/sprite_collect_rotating.html#sprite-collect-rotating
if you want to copy and paste examples from site web, you get this:
The text was updated successfully, but these errors were encountered: