1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #902 resolved

ShellSessionLexer missing closing `]`

Derek Harland
created an issue

Currently this lexer identifies command line prompts using:

        for match in line_re.finditer(text):
            line = match.group()
            m = re.match(r'^((?:\[?\S+@[^$#%]+)[$#%])(.*\n?)', line)

So this optionally matches a [ using \[? but does not try to match a closing ] within the expression

Comments (2)

  1. Log in to comment