GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding >1 new line within a codeblock doesn't correctly match the indentation · Issue #119356 · python/cpython

Adding >1 new line within a codeblock doesn't correctly match the indentation #119356

New issue
Copy link
New issue
Copy link
Closed
Closed
Adding >1 new line within a codeblock doesn't correctly match the indentation#119356
Copy link
Labels
topic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@aelsayed95
aelsayed95
opened on May 21, 2024
Issue body actions

Bug report

Bug description:

Adding more than one new line within a codeblock doesn't correctly match the indentation the previous line's indentation:

For example if I start with the following codeblock:

>>> def f():
...     
...     a = 1
>>>

and modify it to add two additional new lines in-block, I end up with the following:

>>> def f():
...     
... 
... 
...     a = 1
...     
>>>

Note that now, lines 2,5 have indentation, but lines 3 and 4 have no indentation.
This doesn't match IPython's behaviour.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Activity

  1. aelsayed95
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 21, 2024
  2. lysnikolaou
    added
    topic-replRelated to the interactive shellRelated to the interactive shell
    on May 21, 2024
  3. savannahostrowski commented on May 21, 2024

    @savannahostrowski
    savannahostrowski
    on May 21, 2024
    Member
    More actions

    In case it's helpful, this is also reproducible on Fedora, using the Devcontainer configuration in the repo.

  4. lysnikolaou commented on Jun 4, 2024

    @lysnikolaou
    lysnikolaou
    on Jun 4, 2024
    Member
    More actions

    Thanks for the issue @aelsayed95 and the confirmation @savannahostrowski!

    This was fixed in #119606. Feel free to reopen in case you encounter this again.

    Reacted by Savannah Ostrowski
  5. lysnikolaou
    closed this as completedon Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.