better fix end of line stripping; strip whitespaces

This commit is contained in:
Radovan Garabík 2017-11-04 21:14:07 +01:00
parent c43e6a2ca3
commit a110dd51bd
7 changed files with 10 additions and 10 deletions

View File

@ -16,7 +16,7 @@ colours=red
====== ======
# PORTS # PORTS
regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+) regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+)
colours=default,blue,bold blue colours=default,blue,bold blue
====== ======
# Error Line # Error Line
regexp=^error\s(?:\w+\s)+([a-z\-_0-9]+):(.*)$ regexp=^error\s(?:\w+\s)+([a-z\-_0-9]+):(.*)$

View File

@ -1,9 +1,9 @@
# #
regexp=\b(g?cc|[gc]\+\+|g?as|ld)\b regexp=\b(g?cc|[gc]\+\+|g?as|ld)\b
colours=white bold colours=white bold
count=once count=once
......... .........
# #
regexp=^[^:\s]*?:\d+: regexp=^[^:\s]*?:\d+:
colours=bold magenta colours=bold magenta
......... .........
@ -11,7 +11,7 @@ regexp=^[^:\s]*?:
colours=cyan colours=cyan
count=once count=once
......... .........
# #
regexp=\`[A-Za-z0-9_():&*]+( const)?\' regexp=\`[A-Za-z0-9_():&*]+( const)?\'
colours=magenta colours=magenta
......... .........
@ -28,7 +28,7 @@ regexp=\-o\s[^\s]+
colours=yellow colours=yellow
......... .........
# warning and error won't work, unless you redirect also # warning and error won't work, unless you redirect also
# stderr to grcat # stderr to grcat
# #
# warning # warning
regexp=[Ww]arning[:\b] regexp=[Ww]arning[:\b]

View File

@ -36,7 +36,7 @@ colours=red
# "linkdown" # "linkdown"
regexp=linkdown regexp=linkdown
colours=bold red colours=bold red
- -
# "src" # "src"
regexp=src \S+ regexp=src \S+

View File

@ -24,7 +24,7 @@ colours=bold green
======= =======
# everything in parentheses # everything in parentheses
regexp=\(.+?\) regexp=\(.+?\)
colours=green colours=green
count=more count=more
======= =======
# channel name # channel name

View File

@ -1,5 +1,5 @@
# Intended for colouring LDIF output (from ldap tools) # Intended for colouring LDIF output (from ldap tools)
# comments # comments
regexp=^#.* regexp=^#.*
colours=green colours=green
count=stop count=stop

View File

@ -2,7 +2,7 @@
regexp=(\s|^)\d+([.,]\d+)?\s?([kKMG][bB]|[bB]|[kKMG])(?=[\s,]|$) regexp=(\s|^)\d+([.,]\d+)?\s?([kKMG][bB]|[bB]|[kKMG])(?=[\s,]|$)
colours=yellow colours=yellow
======= =======
# #
regexp=<=> regexp=<=>
colours=yellow colours=yellow

2
grcat
View File

@ -135,7 +135,7 @@ while not is_last:
continue continue
if not l[0] in letters: if not l[0] in letters:
break break
fields = split(l.strip(), "=", 1) fields = split(l.rstrip('\r\n'), "=", 1)
if len(fields) != 2: if len(fields) != 2:
sys.stderr.write('Error in configuration, I expect keyword=value line\n') sys.stderr.write('Error in configuration, I expect keyword=value line\n')
sys.stderr.write('But I got instead:\n') sys.stderr.write('But I got instead:\n')