Commits

Georg Brandl  committed 74c6076

Closes #902: add missing option "]" after prompt in ShellSession lexer

  • Participants
  • Parent commits a9a100c

Comments (0)

Files changed (1)

File pygments/lexers/shell.py

 
         for match in line_re.finditer(text):
             line = match.group()
-            m = re.match(r'^((?:\[?\S+@[^$#%]+)[$#%])(.*\n?)', line)
+            m = re.match(r'^((?:\[?\S+@[^$#%]+\]?\s*)[$#%])(.*\n?)', line)
             if m:
                 # To support output lexers (say diff output), the output
                 # needs to be broken by prompts whenever the output lexer