Update headLineManager.py
This commit is contained in:
parent
621bee3d31
commit
638e57eab1
@ -5,7 +5,7 @@
|
|||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
from core import debug
|
from core import debug
|
||||||
import re
|
import re, string
|
||||||
|
|
||||||
class headLineManager():
|
class headLineManager():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -16,6 +16,12 @@ class headLineManager():
|
|||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
pass
|
pass
|
||||||
def replaceHeadLines(self, text):
|
def replaceHeadLines(self, text):
|
||||||
|
# fast len check for bigger typing echo
|
||||||
|
if len(text) < 5:
|
||||||
|
return text
|
||||||
|
# more strong check, to not match if not needed:
|
||||||
|
if len(text.strip(string.ascii_letters+string.digits+string.whitespace)) < 5:
|
||||||
|
return text
|
||||||
result = ''
|
result = ''
|
||||||
newText = ''
|
newText = ''
|
||||||
lastPos = 0
|
lastPos = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user