Skip to content

emphasize-lines on code-block and literalinclude adds extra CR #118

Open
@userlerueda

Description

@userlerueda

Describe the bug

When we copy a code block with emphasize-lines it adds an additional carrier return to the copied text

To Reproduce

Steps to reproduce the behavior:

  1. Create a sphinx directive like this one:
.. code-block::
    :emphasize-lines: 1

    [cisco@centos]$ docker exec -it cl_app_1 bash
    root@5109156083d2:/app# 
  1. Create documentation
  2. Click on copy button
  3. Paste text in an editor and see the extra line in between line 1 and 2

Expected behavior

Text should be copied as is

Environment

  • Python Version: 3.9.2
  • Sphinx v3.5.1
  • Operating System: 11.2.3

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions