From 40a57d40ed7040678d7841814eeba78c3e6cca8e 2021-04-18 13:44:53 From: Blazej Michalik Date: 2021-04-18 13:44:53 Subject: [PATCH] Fix indentation of the transformer regex --- diff --git a/IPython/core/inputtransformer2.py b/IPython/core/inputtransformer2.py index b0aac2b..fefc523 100644 --- a/IPython/core/inputtransformer2.py +++ b/IPython/core/inputtransformer2.py @@ -92,23 +92,23 @@ classic_prompt = PromptStripper( ipython_prompt = PromptStripper( re.compile( r""" - ^( # Match from the beginning of a line, either: + ^( # Match from the beginning of a line, either: - # 1. First-line prompt: - ((\[nav\]|\[ins\])?\ )? # Vi editing mode prompt, if it's there - In\ # The 'In' of the prompt, with a space - \[\d+\]: # Command index, as displayed in the prompt - \ # With a mandatory trailing space + # 1. First-line prompt: + ((\[nav\]|\[ins\])?\ )? # Vi editing mode prompt, if it's there + In\ # The 'In' of the prompt, with a space + \[\d+\]: # Command index, as displayed in the prompt + \ # With a mandatory trailing space - | # ... or ... + | # ... or ... - # 2. The three dots of the multiline prompt - \s* # All leading whitespace characters - \.{3,}: # The three (or more) dots - \ ? # With an optional trailing space + # 2. The three dots of the multiline prompt + \s* # All leading whitespace characters + \.{3,}: # The three (or more) dots + \ ? # With an optional trailing space - ) - """, + ) + """, re.VERBOSE, ) )