Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ShellSessionBaseLexer: Support whitespace in virtualenv prompt
The default virtualenv prompt contains a single space after the name of the virtualenv in parentheses. Commit 3f40368 which resolved pygments#1253 assigns the "Text" class to any whitespace between the virtualenv name and the rest of the prompt, but this is problematic, because it makes the space selectable, and doesn't include it in the prompt. Fix this by assigning the Generic.Prompt class to the space between the name of the virtualenv and the rest of the prompt, instead of Text. Also update the test accordingly. Closes pygments#2496 Signed-off-by: Vangelis Koukis <evangelos.koukis@hpe.com>
- Loading branch information