diff options
-rw-r--r-- | pygments/lexers/textfmts.py | 6 | ||||
-rw-r--r-- | tests/examplefiles/example.weechatlog | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/pygments/lexers/textfmts.py b/pygments/lexers/textfmts.py index 63e67182..e3700e9f 100644 --- a/pygments/lexers/textfmts.py +++ b/pygments/lexers/textfmts.py @@ -35,9 +35,11 @@ class IrcLogsLexer(RegexLexer): # irssi / xchat and others (?: \[|\()? # Opening bracket or paren for the timestamp (?: # Timestamp - (?: (?:\d{1,4} [-/]?)+ # Date as - or /-separated groups of digits + (?: (?:\d{1,4} [-/])* # Date as - or /-separated groups of digits + (?:\d{1,4}) [T ])? # Date/time separator: T or space - (?: \d?\d [:.]?)+ # Time as :/.-separated groups of 1 or 2 digits + (?: \d?\d [:.])* # Time as :/.-separated groups of 1 or 2 digits + (?: \d?\d [:.]) ) (?: \]|\))?\s+ # Closing bracket or paren for the timestamp | diff --git a/tests/examplefiles/example.weechatlog b/tests/examplefiles/example.weechatlog index 9f036166..15e8130f 100644 --- a/tests/examplefiles/example.weechatlog +++ b/tests/examplefiles/example.weechatlog @@ -6,4 +6,6 @@ 2007 Sep 01 00:23:55 -=- Das Topic von &bitlbee lautet: "Welcome to the control channel. Type help for help information." 2007 Sep 01 00:23:55 <root> Welcome to the BitlBee gateway! 2007 Sep 01 00:23:55 <root> -2007 Sep 01 00:23:55 <root> If you've never used BitlBee before, please do read the help information using the help command. Lots of FAQ's are answered there.
\ No newline at end of file +2007 Sep 01 00:23:55 <root> If you've never used BitlBee before, please do read the help information using the help command. Lots of FAQ's are answered there. +# check for fixed pathological matching behavior +1111111111111111111111111111111 |