sphinx-doc / sphinx-doc/sphinx

Line numbers could be selected in safari, and could not be selected in google chrome.

Open
#9,855 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

html theme type:bug
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When we want to select code to copy, the line number and >>> should not be selected, but if we open the html in safari. the line number and >>> will be selected.

How to Reproduce
$ git clone https://github.com/.../some_project
$ cd some_project
$ pip install -r requirements.txt
$ cd docs
$ make html SPHINXOPTS="-D language=de"
$ # open _build/html/index and see bla bla
Expected behavior
image
Your project

https://tensorbay-python-sdk.graviti.com/en/latest/index.html

Screenshots
image
OS

Mac

Python version

3.9.4

Sphinx version

4.3.0

Sphinx extensions

[ "sphinx.ext.autodoc", # used for generating doc automatically "sphinx.ext.viewcode", # used for imbedding source code automatically "sphinx.ext.autosummary", # used for creating summary table automatically "sphinx.ext.todo", # used for recording todo and todolist "sphinx.ext.ifconfig", # used for configuration based on different condtitions "sphinx.ext.intersphinx", # used for embedding doc links from other project such as python "sphinx.ext.autosectionlabel", # used for referring sections in a rst file "sphinx.ext.napoleon", # used for being compatible with Google and Numpy doc style "sphinx.ext.coverage", # used for generating doc coverage report]

Extra tools

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by building the documentation with make html SPHINXOPTS="-D language=de" and opening _build/html/index in Safari and Chrome. Inspect the generated HTML and the Sphinx HTML output involved in code blocks; done means line numbers and >>> are excluded from selection consistently in both browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.